编辑 | blame | 历史 | 原始文档

electron-vite-vue

🥳 Really simple Electron + Vue + Vite boilerplate.

GitHub Build
GitHub Discord

Features

📦 Out of the box
🎯 Based on the official template-vue-ts, less invasive
🌱 Extensible, really simple directory structure
💪 Support using Node.js API in Electron-Renderer
🔩 Support C/C++ native addons
🖥 It's easy to implement multiple windows

Quick Setup

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

# enter the project directory
cd electron-vite-vue

# install dependency
npm install

# develop
npm run dev

Debug

electron-vite-react-debug.gif

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

FAQ

编辑 | blame | 历史 | 原始文档

2022-10-03

v2.1.0

  • vite-electron-plugin is Fast, and WYSIWYG. 🌱
  • last-commit: db2e830 v2.1.0: use vite-electron-plugin instead vite-plugin-electron

2022-06-04

v2.0.0

  • 🖖 Based on the vue-ts template created by npm create vite, integrate vite-plugin-electron
  • ⚡️ More simplify, is in line with Vite project structure
  • last-commit: a15028a (HEAD -> main) feat: hoist process.env

2022-01-30

v1.0.0

  • ⚡️ Main、Renderer、preload, all built with vite

2022-01-27

  • Refactor the scripts part.
  • Remove configs directory.

2021-11-11

  • Refactor the project. Use vite.config.ts build Main-process, Preload-script and Renderer-process alternative rollup.
  • Scenic Vue>=3.2.13, @vue/compiler-sfc is no longer necessary.
  • If you prefer Rollup, Use rollup branch.
Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
编辑 | blame | 历史 | 原始文档
MIT License

Copyright (c) 2023 草鞋没号

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.