English | ็ฎไฝไธญๆ
๐ฆ Out of the box
๐ช Support C/C++ addons
๐ฉ Support Use ElectronใNode.js API in Renderer-process
๐ฑ Simple directory structure๏ผreal flexible
๐ฅ It's easy to implement multiple windows
npm create electron-vite
๐จ 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
-
First, you need to know if your dependencies are needed after the application is packaged.
-
Like serialport, sqlite3 they are node-native modules and should be placed in
dependencies
. In addition, Vite will not build them, but treat them as external modules. -
Dependencies like Vue and React, which are pure javascript modules that can be built with Vite, can be placed in
devDependencies
. This reduces the size of the application.