electron-vite-react
English | ็ฎไฝไธญๆ
Overview
๐ฆ Out of the box ๐ฏ Based on react-ts template, less invasive ๐ฑ Simple directory structure๏ผreal flexible ๐ช Support Use ElectronใNode.js API and in Renderer-process ๐ฉ Support C/C++ native addons ๐ฅ It’s easy to implement multiple windows
Quick start
npm create electron-vite
Debug
Directory structure
๐จ By default, the files in electron
folder will be built into the dist/electron
โโโ electron Electron-related code
โ โโโ main Main-process source code
โ โโโ preload Preload-script source code
โ โโโ resources Resources for the production build
โ โโโ icon.icns Icon for the application on macOS
โ โโโ icon.ico Icon for the application
โ โโโ installerIcon.ico Icon for the application installer
โ โโโ uninstallerIcon.ico Icon for the application uninstaller
โ
โโโ release Generated after production build, contains executables
โ โโโ{version}
โ โโโ {os}-unpacked Contains unpacked application executable
โ โโโ Setup.{ext} Installer for the application
โ
โโโ public Static assets
โโโ src Renderer source code, your React application
๐จ dependencies
vs devDependencies
Put Node.js packages in dependencies
๐จ e.g.
electron-store
sqlite3
serilaport
mongodb
- …others Node.js packages
Put Web packages in devDependencies
๐จ e.g.
react
react-dom
react-router
mobx
zustand
antd
axios
- …others Web packages
TODO: ESM packages
node-fetch
execa
- …others ESM packages
See more ๐ dependencies vs devDependencies