-
TypeScript + React
-
Electron
- Use electron-builder to build the app
-
Preload Support
- Also works on production build
- Provides context sharing between main and renderer with the following two types:
APIKey
: String Literal TypeAPI
: Object Type
- In renderer process, context objects can be accessed by
window.{APIKey}.{keyof API}
- In preload-side, objects can be exposed to the renderer process by calling
contextBridge.exposeInMainWorld({APIKey}, {API})
- Security issues
nodeIntegration
is set tofalse
contextIsolation
is set totrue
-
DevTools Extensions
note: This template uses DevTools Extensions installed in the host's Google Chrome
- It has been confirmed to work in the following environments: - [ ] Windows - [ ] Mac - [x] Linux
-
yarn dev
- Launch a development server and an electron window
- Quit by Ctrl-C
-
yarn build
- Pack the app into
dist
directory as an installer
- Pack the app into
- Clone this repository
- Run
yarn install