Skip to content

caoxiemeihao/electron-vite-boilerplate

Repository files navigation

electron-vite-boilerplate

🥳 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

🍵 🍰 🍣 🍟