|
| 1 | +# electron-vite-vue |
| 2 | + |
| 3 | +🥳 Really simple `Electron` + `Vue` + `Vite` boilerplate. |
| 4 | + |
| 5 | +[](https://github.com/vitejs/awesome-vite) |
| 6 | +[](https://app.netlify.com/sites/electron-vite/deploys) |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## Features |
| 12 | + |
| 13 | +📦 Out of the box |
| 14 | +🎯 Based on the official [vue-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-vue-ts) template, less invasive |
| 15 | +🌱 Extensible, really simple directory structure |
| 16 | +💪 Support using Node.js API in Electron-Renderer |
| 17 | +🔩 Support C/C++ native addons |
| 18 | +🖥 It's easy to implement multiple windows |
| 19 | + |
| 20 | +## Quick Start |
| 21 | + |
| 22 | +```sh |
| 23 | +npm create electron-vite |
| 24 | +``` |
| 25 | + |
| 26 | +<!-- [](https://asciinema.org/a/483731) --> |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +## Debug |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +## Directory |
| 35 | + |
| 36 | +```diff |
| 37 | ++ ├─┬ electron |
| 38 | ++ │ ├─┬ main |
| 39 | ++ │ │ └── index.ts entry of Electron-Main |
| 40 | ++ │ └─┬ preload |
| 41 | ++ │ └── index.ts entry of Preload-Scripts |
| 42 | + ├─┬ src |
| 43 | + │ └── main.ts entry of Electron-Renderer |
| 44 | + ├── index.html |
| 45 | + ├── package.json |
| 46 | + └── vite.config.ts |
| 47 | +``` |
| 48 | + |
| 49 | +## 🚨 Be aware |
| 50 | + |
| 51 | +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](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#config-presets-opinionated). |
| 52 | + |
| 53 | +```diff |
| 54 | +# vite.config.ts |
| 55 | + |
| 56 | +electron({ |
| 57 | +- renderer: {} |
| 58 | +}) |
| 59 | +``` |
| 60 | + |
| 61 | +## FAQ |
| 62 | + |
| 63 | +- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#dependencies-vs-devdependencies) |
| 64 | +- [Using C/C++ native addons in Electron-Renderer](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#load-nodejs-cc-native-modules) |
| 65 | +- [Node.js ESM packages](https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#nodejs-esm-packages) (e.g. `execa` `node-fetch`) |
0 commit comments