Production Ready Boilerplate template with electron-webpack, react & typescript.
-
This boilerplate is based on
electron-webpack, the template comes packed with...- Use of
webpack-dev-serverfor development - HMR for both
rendererandmainprocesses - Use of
babel-preset-envthat is automatically configured based on yourelectronversion - Use of
electron-builderto package and build a distributable electron application
Make sure to check out
electron-webpack's documentation for more details. - Use of
- A React app which is similar to CRA is added as the renderer.
This is a template repository, you can create repo by using "Use this Template" option from GitHub. Or can simply fork/clone this repository, install dependencies, and get started on your application.
The use of the yarn package manager is strongly recommended, as opposed to using npm.
# Create new repo with https://github.com/vazra/electron-webpack-typescript-react/generate
# or create a directory of your choice, and copy template using curl
mkdir new-electron-react-app && cd new-electron-react-app
curl -fsSL https://github.com/vazra/electron-webpack-typescript-react/archive/master.tar.gz | tar -xz --strip-components 1
# or copy template using git clone
git clone https://github.com/vazra/electron-webpack-typescript-react.git
cd electron-webpack-quick-start
rm -rf .git
# install dependencies
yarn# run application in development mode
yarn dev
# compile source code and create webpack output
yarn compile
# `yarn compile` & create build with electron-builder
yarn dist
# `yarn compile` & create unpacked build with electron-builder
yarn dist:dirIf you are looking to build electron apps with native database, there is a fork of this repo available at electron-react-ts-rxdb-realm-sqlite which implements native databases. 👍
For any bugs or requests create issues here
Pull requests are also invited. 🚀