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

electron-vite-vue

🥳 Really simple Electron + Vue + Vite boilerplate.

awesome-vite
Netlify Status
GitHub license
GitHub stars
GitHub forks

Features

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

Quick Start

npm create electron-vite

electron-vite-vue.gif

Debug

electron-vite-react-debug.gif

Directory

+ ├─┬ electron
+ │ ├─┬ main
+ │ │ └── index.ts    entry of Electron-main
+ │ └─┬ preload
+ │   └── index.ts    entry of Electron-preload
  ├─┬ src
  │ └── main.ts       entry of Electron-renderer
  ├── index.html
  ├── package.json
  └── vite.config.ts

Examples

Used in Main-process 👉 electron-vite-boilerplate

Used in Renderer-process 👉 electron-vite-boilerplate/tree/nodeIntegration

List the modules you may use as far as possible

ES Modules
Native Addons(C/C++)
编辑 | blame | 历史 | 原始文档

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

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) 2020 草鞋没号

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.
CHANGELOG 851 b
README 2 KB
log 82 b