mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-02-26 13:00:09 +08:00
Merge pull request #179 from electron-vite/dev
chore: some optimization
This commit is contained in:
commit
07a342951a
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: Bug_Report
|
|
||||||
|
name: 🐞 Bug report
|
||||||
about: Create a report to help us improve
|
about: Create a report to help us improve
|
||||||
title: "[Bug] the title of bug report"
|
title: "[Bug] the title of bug report"
|
||||||
labels: bug
|
labels: bug
|
||||||
@ -7,23 +8,4 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### What did I do
|
#### Describe the bug
|
||||||
|
|
||||||
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
|
|
||||||
|
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -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.
|
|
12
.github/ISSUE_TEMPLATE/help_wanted.md
vendored
12
.github/ISSUE_TEMPLATE/help_wanted.md
vendored
@ -1,16 +1,10 @@
|
|||||||
---
|
---
|
||||||
name: Help_Wanted
|
name: 🥺 Help wanted
|
||||||
about: Confuse about the use of electron-vue-vite
|
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
|
labels: help wanted
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Describe the problem you Confuse
|
#### 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.
|
|
||||||
|
41
README.md
41
README.md
@ -50,31 +50,26 @@ npm create electron-vite
|
|||||||
|
|
||||||
**Put Node.js packages in `dependencies`**
|
**Put Node.js packages in `dependencies`**
|
||||||
|
|
||||||
🚨 e.g.
|
**e.g.** `electron-store` `sqlite3` `serilaport` `mongodb` ...others
|
||||||
|
|
||||||
- `electron-store`
|
|
||||||
- `sqlite3`
|
|
||||||
- `serilaport`
|
|
||||||
- `mongodb`
|
|
||||||
- ...others Node.js packages
|
|
||||||
|
|
||||||
**Put Web packages in `devDependencies`**
|
**Put Web packages in `devDependencies`**
|
||||||
|
|
||||||
🚨 e.g.
|
**e.g.** `vue` `vue-router` `vuex` `pinia` `element-plus` `ant-design-vue` `axios` ...others
|
||||||
|
|
||||||
- `vue`
|
|
||||||
- `vue-router`
|
|
||||||
- `vuex`
|
|
||||||
- `pinia`
|
|
||||||
- `element-plus`
|
|
||||||
- `ant-design-vue`
|
|
||||||
- `axios`
|
|
||||||
- ...others Web packages
|
|
||||||
|
|
||||||
**TODO: ESM packages**
|
|
||||||
|
|
||||||
- `node-fetch`
|
|
||||||
- `execa`
|
|
||||||
- ...others ESM packages
|
|
||||||
|
|
||||||
See more 👉 [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies)
|
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']),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
```
|
||||||
|
0
types.d.ts → electron/electron-env.d.ts
vendored
0
types.d.ts → electron/electron-env.d.ts
vendored
@ -19,8 +19,7 @@
|
|||||||
"electron-builder": "^23.0.3",
|
"electron-builder": "^23.0.3",
|
||||||
"typescript": "^4.7.3",
|
"typescript": "^4.7.3",
|
||||||
"vite": "^2.9.13",
|
"vite": "^2.9.13",
|
||||||
"vite-plugin-electron": "^0.6.1",
|
"vite-plugin-electron": "^0.6.2",
|
||||||
"vite-plugin-resolve": "^2.1.2",
|
|
||||||
"vue": "^3.2.36",
|
"vue": "^3.2.36",
|
||||||
"vue-tsc": "^0.36.0"
|
"vue-tsc": "^0.36.0"
|
||||||
},
|
},
|
||||||
|
@ -6,9 +6,5 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["vite.config.ts", "electron", "package.json"]
|
||||||
"vite.config.ts",
|
|
||||||
"vite.config.electron.ts",
|
|
||||||
"package.json"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ export default defineConfig({
|
|||||||
entry: 'electron/main/index.ts',
|
entry: 'electron/main/index.ts',
|
||||||
vite: {
|
vite: {
|
||||||
build: {
|
build: {
|
||||||
sourcemap: false,
|
|
||||||
outDir: 'dist/electron/main',
|
outDir: 'dist/electron/main',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user