π₯³ Really simple Electron + Vite boilerplate.
π¦ Out of the box
π Quick Start of vite-plugin-electron
π― Based on the official template-vanilla-ts, less invasive
# 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+ βββ¬ 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π¨ 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: {}
})- dependencies vs devDependencies
- Using C/C++ native addons in Electron-Renderer
- Node.js ESM packages (e.g.
execanode-fetch)

