Awesome
electron-vite-boilerplate
🥳 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.
execa
node-fetch
)