English
π¦ Ready out of the box
π― Based on the official solidjs/templates/ts, project structure will be familiar to you
π± Easily extendable and customizable
πͺ Supports Node.js API in the renderer process
π© Supports C/C++ native addons
π Debugger configuration included
π₯ Easy to implement multiple windows
git clone --depth 1 --branch main https://github.com/maulik9898/electron-vite-solidjs-tailwindcss.git your-project-name
cd your-project-name
npm install
Familiar React application structure, just with electron
folder on the top π
Files in this folder will be separated from your React application and built into dist/electron
βββ electron Electron-related code
β βββ main Main-process source code
β βββ preload Preload-scripts 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
This template integrates Node.js API to the renderer process by default. If you want to follow Electron Security Concerns you might want to disable this feature. You will have to expose needed API by yourself.
To get started, remove the option as shown below. This will modify the Vite configuration and disable this feature.
# vite.config.ts
electron({
- renderer: {}
})
- dependencies vs devDependencies
- Using C/C++ native addons in renderer
- Node.js ESM packages (e.g.
execa
node-fetch
)