Skip to content

AGenson/electron-react-webpack-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron-React App Template

Electron-React simple template using:



Quick start

Install and setup:

git clone https://github.com/AGenson/electron-react-webpack-ts.git
cd electron-react-webpack-ts
yarn

Run in production mode:

yarn run build
yarn start

Run in development mode

yarn run dev

Distribute the app on different OS:

yarn run build

yarn run dist:mac
yarn run dist:win
yarn run dist:linux

Project Structure

Renderer

The renderer is the React code in src/renderer folder. You can start editing the App.tsx in src/renderer/components.

The renderer can be run independently in both development or production.

Running development

Contrary to the renderer, the main process needs the renderer running. Same dependence in production, electron needs the renderer to be built.

There are two sub-scripts in devolpment mode:

  • main:dev-build: use Webpack in watch mode to transpile the code
  • main:dev-watch:
    • wait for the first build from Webpack
    • then launch nodemon on webpack's output to relaunch Electron's instance

About

Electron-React template with Typescript and Webpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published