electron-vite-boilerplate

March 13, 2023 ยท View on GitHub

๐Ÿฅณ Really simple Electron + Vite boilerplate.

screenshort.png

Features

๐Ÿ“ฆ Out of the box
๐Ÿš€ Quick Start of vite-plugin-electron
๐ŸŽฏ Based on the official template-vanilla-ts, less invasive

Run Setup

# clone the project
git clone https://github.com/electron-vite/electron-vite-boilerplate.git

# enter the project directory
cd electron-vite-boilerplate

# install dependency
npm install

# develop
npm run dev

Directory

+ โ”œโ”€โ”ฌ electron
+ โ”‚ โ”œโ”€โ”ฌ main
+ โ”‚ โ”‚ โ””โ”€โ”€ index.ts    entry of Electron-Main
+ โ”‚ โ””โ”€โ”ฌ preload
+ โ”‚   โ””โ”€โ”€ index.ts    entry of Preload-Scripts
  โ”œโ”€โ”ฌ src
  โ”‚ โ””โ”€โ”€ main.ts       entry of Electron-Renderer
  โ”œโ”€โ”€ index.html
  โ”œโ”€โ”€ package.json
  โ””โ”€โ”€ vite.config.ts

Be aware

๐Ÿšจ By default, this template integrates Node.js in the Renderer process. If you don't need it, you just remove the option below. Because it will modify the default config of Vite.

# vite.config.ts

electron({
- renderer: {}
})

FAQ

๐Ÿต ๐Ÿฐ ๐Ÿฃ ๐ŸŸ