From befd9c4717c4d2de891b829779a1eb235e2e771a Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:06:58 +0800 Subject: [PATCH 01/11] chore:vite-plugin-resolve --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index a51a514..80e1e0f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "typescript": "^4.7.3", "vite": "^2.9.13", "vite-plugin-electron": "^0.6.1", - "vite-plugin-resolve": "^2.1.2", "vue": "^3.2.36", "vue-tsc": "^0.36.0" }, From 4a2f86a43eaf2e0b3eb267712ed5a8d3d13830c6 Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:09:12 +0800 Subject: [PATCH 02/11] chore:bump vite to 3.0.0-beta.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 80e1e0f..db41214 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "electron": "^19.0.3", "electron-builder": "^23.0.3", "typescript": "^4.7.3", - "vite": "^2.9.13", + "vite": "^3.0.0-beta.5", "vite-plugin-electron": "^0.6.1", "vue": "^3.2.36", "vue-tsc": "^0.36.0" From bc6438e4c8e101b569a8c1773b88fcad4027c36d Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:10:02 +0800 Subject: [PATCH 03/11] chore:bump vite-plugin-electron to 0.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db41214..3a37f28 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "electron-builder": "^23.0.3", "typescript": "^4.7.3", "vite": "^3.0.0-beta.5", - "vite-plugin-electron": "^0.6.1", + "vite-plugin-electron": "^0.6.2", "vue": "^3.2.36", "vue-tsc": "^0.36.0" }, From 825df2bbb91d38caa2a6c011c10d350c6af30b72 Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:17:47 +0800 Subject: [PATCH 04/11] =?UTF-8?q?docs:=20=F0=9F=9A=A8=20ESM=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index f36480e..04d94d5 100644 --- a/README.md +++ b/README.md @@ -50,31 +50,26 @@ npm create electron-vite **Put Node.js packages in `dependencies`** -🚨 e.g. - -- `electron-store` -- `sqlite3` -- `serilaport` -- `mongodb` -- ...others Node.js packages +**e.g.** `electron-store` `sqlite3` `serilaport` `mongodb` ...others **Put Web packages in `devDependencies`** -🚨 e.g. - -- `vue` -- `vue-router` -- `vuex` -- `pinia` -- `element-plus` -- `ant-design-vue` -- `axios` -- ...others Web packages - -**TODO: ESM packages** - -- `node-fetch` -- `execa` -- ...others ESM packages +**e.g.** `vue` `vue-router` `vuex` `pinia` `element-plus` `ant-design-vue` `axios` ...others See more 👉 [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies) + +## 🚨 ESM packages + +**e.g.** `node-fetch` `execa` `got` ...others + +1. `npm i vite-plugin-esmodule -D` +2. Configure in vite.config.ts + +```ts +import esmodule from 'vite-plugin-esmodule' +export default { + plugins: [ + esmodule(['got', 'execa', 'node-fetch']), + ], +} +``` From 045a7ec91bfceb14a8dba7c3ebc12e4991a7f8ff Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:19:40 +0800 Subject: [PATCH 05/11] remove feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 24 ----------------------- 1 file changed, 24 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index efe991e..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature_Want -about: Suggest an idea for electron-vue-vite -title: "[Feature] the title of Feature_Want report" -labels: feature -assignees: '' - ---- - -#### Motivation - -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -#### Detailed design - -Describe the solution you'd like, a clear and concise description of what you want to happen. - -#### Alternatives - -Describe alternatives you've considered, what other designs have been considered? What is the impact of not doing this? - -#### More detail (optional) - -Add any other context or screenshots about the feature request here. From 09eb5e3104f42bc579d3fb7e8c30ee7861d9ea1a Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:23:36 +0800 Subject: [PATCH 06/11] chore:update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 545c908..2bc0b86 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,5 +1,6 @@ --- -name: Bug_Report + +name: 🐞 Bug report about: Create a report to help us improve title: "[Bug] the title of bug report" labels: bug @@ -7,23 +8,4 @@ assignees: '' --- -#### What did I do - -Something you have done. - -#### What happened - -Get an error. - -#### Expected - -What is the expected result. - -#### Environment - -- OS: OS version, e.g. macOS Big Sur 11.1 -- electron-vue-vite version (or commit hash), e.g. v1.0.0 - -#### More detail - -More detail like screenshot +#### Describe the bug From c8eabac9cf4bc88bb70cf995b309f88f06e774c4 Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:24:47 +0800 Subject: [PATCH 07/11] chore:update help_wanted.md --- .github/ISSUE_TEMPLATE/help_wanted.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/help_wanted.md b/.github/ISSUE_TEMPLATE/help_wanted.md index 2eb9bb8..6fba797 100644 --- a/.github/ISSUE_TEMPLATE/help_wanted.md +++ b/.github/ISSUE_TEMPLATE/help_wanted.md @@ -1,16 +1,10 @@ --- -name: Help_Wanted +name: 🥺 Help wanted about: Confuse about the use of electron-vue-vite -title: "[Help] the title of Help_Want report" +title: "[Help] the title of help wanted report" labels: help wanted assignees: '' --- -#### Describe the problem you Confuse - -A clear and concise description of what you are confusing about. - -#### More detail (optional) - -Add any other context or screenshots. +#### Describe the problem you confuse From 2dae540bce523ba52787d071a06de26a9d4f81ad Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:26:09 +0800 Subject: [PATCH 08/11] chore:update tsconfig.node.json include --- tsconfig.node.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tsconfig.node.json b/tsconfig.node.json index 607d345..84b5c20 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,9 +6,5 @@ "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, - "include": [ - "vite.config.ts", - "vite.config.electron.ts", - "package.json" - ] + "include": ["vite.config.ts", "electron", "package.json"] } From 2abbae8dc76d22f3f0451e46528dc2557fa6ff9f Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:28:05 +0800 Subject: [PATCH 09/11] types.d.ts -> electron/electron-env.d.ts --- types.d.ts => electron/electron-env.d.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename types.d.ts => electron/electron-env.d.ts (100%) diff --git a/types.d.ts b/electron/electron-env.d.ts similarity index 100% rename from types.d.ts rename to electron/electron-env.d.ts From 14c018c09dd1603c1abefac79613cbbae105f2b5 Mon Sep 17 00:00:00 2001 From: younglei Date: Sat, 2 Jul 2022 22:29:21 +0800 Subject: [PATCH 10/11] chore: remove useless option --- vite.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index d4cd070..8f99926 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,7 +16,6 @@ export default defineConfig({ entry: 'electron/main/index.ts', vite: { build: { - sourcemap: false, outDir: 'dist/electron/main', }, }, From a4eb6a4fc99e212b670b831af41d58a577536d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Sun, 3 Jul 2022 06:41:58 +0800 Subject: [PATCH 11/11] chore(deps): vite: ^2.9.13 #176 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a37f28..f3256cd 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "electron": "^19.0.3", "electron-builder": "^23.0.3", "typescript": "^4.7.3", - "vite": "^3.0.0-beta.5", + "vite": "^2.9.13", "vite-plugin-electron": "^0.6.2", "vue": "^3.2.36", "vue-tsc": "^0.36.0"