mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 03:46:35 +08:00
docs: update
This commit is contained in:
parent
66c380af90
commit
d79f8fc16c
30
README.md
30
README.md
@ -36,30 +36,30 @@ npm create electron-vite
|
||||
```diff
|
||||
+ ├─┬ electron
|
||||
+ │ ├─┬ main
|
||||
+ │ │ └── index.ts entry of Electron-main
|
||||
+ │ │ └── index.ts entry of Electron-Main
|
||||
+ │ └─┬ preload
|
||||
+ │ └── index.ts entry of Electron-preload
|
||||
+ │ └── index.ts entry of Preload-Scripts
|
||||
├─┬ src
|
||||
│ └── main.ts entry of Electron-renderer
|
||||
│ └── main.ts entry of Electron-Renderer
|
||||
├── index.html
|
||||
├── package.json
|
||||
└── vite.config.ts
|
||||
```
|
||||
|
||||
## 🚨 `dependencies` vs `devDependencies`
|
||||
## 🚨
|
||||
|
||||
**Put Node.js packages in `dependencies`**
|
||||
By default, this template integrates Node.js in the Renderer process. If you don't need it, you just remove the option below. [Because it will modify the default config of Vite](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#config-presets-opinionated).
|
||||
|
||||
**e.g.** `electron-store` `sqlite3` `serilaport` `mongodb` ...others
|
||||
```diff
|
||||
# vite.config.ts
|
||||
|
||||
**Put Web packages in `devDependencies`**
|
||||
electron({
|
||||
- renderer: {}
|
||||
})
|
||||
```
|
||||
|
||||
**e.g.** `vue` `vue-router` `vuex` `pinia` `element-plus` `ant-design-vue` `axios` ...others
|
||||
## FAQ
|
||||
|
||||
See more 👉 [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies)
|
||||
|
||||
## 🚨 Node.js ESM packages
|
||||
|
||||
**e.g.** `node-fetch` `execa` `got` ...
|
||||
|
||||
[👉 Using Node.js ESM packages in Electron-Renderer](https://github.com/electron-vite/vite-plugin-electron-renderer#-nodejs-esm-packages)
|
||||
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#dependencies-vs-devdependencies)
|
||||
- [Using C/C++ native addons in Electron-Renderer](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#load-nodejs-cc-native-modules)
|
||||
- [Node.js ESM packages](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#nodejs-esm-packages) (e.g. `execa` `node-fetch`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user