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 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. 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 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']), + ], +} +``` 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 diff --git a/package.json b/package.json index a51a514..f3256cd 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,7 @@ "electron-builder": "^23.0.3", "typescript": "^4.7.3", "vite": "^2.9.13", - "vite-plugin-electron": "^0.6.1", - "vite-plugin-resolve": "^2.1.2", + "vite-plugin-electron": "^0.6.2", "vue": "^3.2.36", "vue-tsc": "^0.36.0" }, 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"] } 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', }, },