Minimal Electron Starter Kit built with Typescript, React, Webpack 5 and Babel 7
To create a JS library, check out js-library-boilerplate-basic.
- Electron 17
- React 17
- Webpack 5
- Babel 7
- Hot reloading (
npm start
) - Jest unit testing (+ Enzyme)
git clone https://github.com/hodgef/electron-webpack-boilerplate.git my-app
npm install
⚠️ Note: This boilerplate usesnodeIntegration
by default, which allows your renderer code to access node. Only use this boilerplate if you are running trusted code in your app. Alternatively, you can change this setting insrc/main/index.ts
and adjust accordingly.
Before shipping, make sure to:
- Edit
LICENSE
file - Edit
package.json
information (This will be used to package your app) - (Optional) Set-up releases, code signing, notarization for your app. Additional docs on this coming soon.
- Use
npm start
to develop your app with Hot Reloading on changes. - Use
npm serve:dist
to serve a semi-production app from the build folder. - Use
npm run dist
to build executables for your app, according to the information in your package.json. - Use
npm run test
to run unit tests for your app.
Check out the reference project PRSS for publishing ideas. This project includes code-signing, Apple notarization and building native packages (such as sqlite) with node-gyp:
- Package configuration: package.json
- Package CI publishing: publish.yml
- Release page (end result): https://github.com/hodgef/PRSS/releases