Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Simple boilerplate to get React and Electron working together

License

Notifications You must be signed in to change notification settings

vert3xo/react-electron-boilerplate

Repository files navigation

Create React App

This project is using create-react-app which is not really recommended anymore. Maybe I'll make something similar for Vite.

React Electron Boilerplate

electron-react-boilerplate was a little too complex so I made my own :)

Get Started

Disclaimer: This project uses yarn do NOT use npm

  1. Install packages with yarn install
  2. Start the development server with yarn start
  3. Build the optimized production version with yarn build
  4. Package the application with yarn package

Packaging

yarn package creates a package for the platform you're currently using.

To build for other platforms use yarn package:<platform> or yarn package:all

Folder Structure

  • build contains compiled code for both React and Electron (yarn build)
  • dist contains packaged Electron application (yarn package)
  • electron contains all Electron code
  • public React public files
  • src contains all React code
  • webpack Webpack configuration

TODO

  • Webpack Bundle Analyzer
  • Webpack Terser Plugin
  • Mini CSS Extract Plugin
  • CSS Minimizer Webpack Plugin