Skip to content

Repository files navigation


Electron React Boilerplate uses Electron, React, React Router, electron-vite and React Fast Refresh.


Build Status Github Tag Discord

OpenCollective OpenCollective StackOverflow

Install

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 install

Having issues installing? See our debugging guide

Starting Development

Start the app in the dev environment:

npm start

Packaging for Production

To package apps for the local platform:

npm run package

Docs

See our docs and guides here

Community

Join our Discord: https://discord.gg/Fjy3vfgy5q

Sponsors

Donations

Donations will ensure the following:

  • 🔨 Long term maintenance of the project
  • 🛣 Progress on the roadmap
  • 🐛 Quick responses to bug reports and help requests

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Maintainers

License

MIT © Electron React Boilerplate

Development and builds

  • npm start: build main/preload, start Vite, and reload on source changes.
  • npm run build: produce main, preload, and renderer bundles in release/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.

About

A Foundation for Scalable Cross-Platform Apps

Topics

Resources

Code of conduct

Stars

24.3k stars

Watchers

274 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages