๐ฅณ Really simple Electron
+ Vue
+ Vite
boilerplate.
๐ฆ Out of the box
๐ฏ Based on the official vue-ts template, less invasive
๐ฑ Extensible, really simple directory structure
๐ช Support using Node.js API in Electron-Renderer
๐ฉ Support C/C++ native addons
๐ฅ It's easy to implement multiple windows
npm create electron-vite
+ โโโฌ electron
+ โ โโโฌ main
+ โ โ โโโ index.ts entry of Electron-main
+ โ โโโฌ preload
+ โ โโโ index.ts entry of Electron-preload
โโโฌ src
โ โโโ main.ts entry of Electron-renderer
โโโ index.html
โโโ package.json
โโโ vite.config.ts
Put Node.js packages in dependencies
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
See more ๐ dependencies vs devDependencies
e.g. node-fetch
execa
got
...others
npm i vite-plugin-esmodule -D
- Configure in vite.config.ts
import esmodule from 'vite-plugin-esmodule'
export default {
plugins: [
esmodule(['got', 'execa', 'node-fetch']),
],
}