raravel / react-electron-template

react + webpack + electron + typescript + babel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Electron Typescript

This is react + electron + webpack + typescript + swc template project. If you wan't this project, clone project and then just run!

Use NPX

npx degit raravel/react-electron-typescript <Your Project>

Git Clone

git clone https://github.com/raravel/react-electron-template.git <Your Project>

Development

yarn dev

Production Build

yarn build

Project Tree

.
├── LICENSE
├── README.md
├── package.json
├── public
│   ├── favicon.ico
│   └── index.html
├── src
│   ├── main
│   │   └── background.ts
│   └── views
│       ├── App.tsx
│       ├── Components
│       │   ├── About.tsx
│       │   └── Home.tsx
│       └── index.tsx
├── swc.electron.json
├── tsconfig.json
└── webpack.config.js

public

Is directory for raw html, script, assets etc.

src/main

For electron background worker. background.ts is like main.js

src/views

You can manipulating react component in src/views.

webpack config

webpack.react.config.js. building src/views contents to dist and run electron process before react webpack dev server.

Description

If you run npm run dev, running process react webpack dev server. and then, running electron process on nodemon. I think it is an efficient way to partially operational hot reload. And by using swc, the build time of typescript is shortened.

About

react + webpack + electron + typescript + babel

License:MIT License


Languages

Language:TypeScript 55.8%Language:JavaScript 38.0%Language:HTML 6.2%