Electron React Boilerplate uses Electron, React, React Router, electron-vite and React Fast Refresh.
Clone the repo and install dependencies:
Requires Node.js 24 or newer and npm 10 or newer. The compiler tooling notes explain the separate tooling install.
git clone --depth 1 --branch main https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
cd your-project-name
npm installHaving issues installing? See our debugging guide
Start the app in the dev environment:
npm startTo package apps for the local platform:
npm run packageSee our docs and guides here
Join our Discord: https://discord.gg/Fjy3vfgy5q
Donations will ensure the following:
- 🔨 Long term maintenance of the project
- 🛣 Progress on the roadmap
- 🐛 Quick responses to bug reports and help requests
Support us with a monthly donation and help us continue our activities. [Become a backer]
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
MIT © Electron React Boilerplate
npm start: build main/preload, start Vite, and reload on source changes.npm run build: produce main, preload, and renderer bundles inrelease/app/dist.npm run preview: build and launch the production bundles locally.npm run package: build installers with electron-builder.npm run test:smoke: verify development startup and preload IPC.
Build settings live in electron.vite.config.ts; development no longer needs a
DLL build or separate webpack watchers. Use PORT to select the renderer port,
or npm start -- --inspect 5858 --remoteDebuggingPort 9223 for debugging.
SVG imports return asset URLs. For React components, use
import Icon from './icon.svg?react'. CSS modules and Sass are handled by Vite.
Native dependencies still belong in release/app/package.json. They remain
external to the main/preload bundles and are rebuilt and packaged by
electron-builder. Other application dependencies are bundled. The build uses
Vite 7, which is supported by electron-vite 5's current peer dependency range.