electron-vite-boilerplate
March 13, 2023 ยท View on GitHub
๐ฅณ Really simple Electron + Vite boilerplate.

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
- dependencies vs devDependencies
- Using C/C++ native addons in Electron-Renderer
- Node.js ESM packages (e.g.
execanode-fetch)
๐ต ๐ฐ ๐ฃ ๐
