MCPcopy Create free account
hub / github.com/alex8088/electron-vite

github.com/alex8088/electron-vite

Chat with this repo
repository ↗ · DeepWiki ↗ · release v6.0.0-beta.5 ↗ · + Follow · compare 3 versions
177 symbols 379 edges 30 files ⚖ MIT 0 documented · 0% ● updated 44d agov6.0.0-beta.1 · 2026-04-12★ 5,61372 open issues

Browse by type

⨍ Functions 139◇ Types & classes 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

electron-vite

Next generation Electron build tooling based on Vite

license

Documentation | Getting Started | create-electron

中文文档

Features

  • ⚡️ Vite powered and use the same way.
  • 🛠 Pre-configure with sensible defaults optimized for Electron.
  • 💡 Optimize asset handling for Electron main process.
  • 🚀 Fast HMR & hot reloading.
  • 🔥 Isolated build for multi-entry application development.
  • ✨ Simplify multi-threading development.
  • 🔒 Compile code to v8 bytecode to protect source code.
  • 🔌 Easy to debug in IDEs such as VSCode or WebStorm.
  • 📦 Out-of-the-box support for TypeScript, Vue, React, Svelte, SolidJS and more.

Usage

Install

npm i electron-vite -D

Development & Build

In a project where electron-vite is installed, you can use electron-vite binary directly with npx electron-vite or add the npm scripts to your package.json file like this:

{
  "scripts": {
    "start": "electron-vite preview",
    "dev": "electron-vite dev",
    "prebuild": "electron-vite build"
  }
}

Configuration

When running electron-vite from the command line, electron-vite will automatically try to resolve a config file named electron.vite.config.js inside project root. The most basic config file looks like this:

// electron.vite.config.js
export default {
  main: {
    // vite config options
  },
  preload: {
    // vite config options
  },
  renderer: {
    // vite config options
  }
}

Getting Started

Clone the electron-vite-boilerplate or use the create-electron tool to scaffold your project.

npm create @quick-start/electron@latest

Currently supported template presets include:

JavaScript TypeScript
vanilla vanilla-ts
vue vue-ts
react react-ts
svelte svelte-ts
solid solid-ts

Contribution

See Contributing Guide.

License

MIT © alex.wei

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 118
Interface 27
Method 21
Class 11

Languages

TypeScript100%

Modules by API surface

src/config.ts33 symbols
src/plugins/bytecode.ts17 symbols
src/plugins/isolateEntries.ts14 symbols
src/plugins/electron.ts14 symbols
src/utils.ts13 symbols
src/plugins/electronCompiler.ts11 symbols
src/electron.ts9 symbols
src/load.ts8 symbols
bin/rpc-peer.cjs7 symbols
src/plugins/swc.ts6 symbols
src/plugins/modulePath.ts6 symbols
node.d.ts6 symbols

Dependencies from manifests, versioned

@babel/core7.29.7 · 1×
@babel/plugin-transform-arrow-functions7.29.7 · 1×
@eslint/js10.0.1 · 1×
@rollup/plugin-json6.1.0 · 1×
@rollup/plugin-node-resolve16.0.3 · 1×
@swc/core1.16.2 · 1×
@types/babel__core7.20.5 · 1×
@types/node22.20.4 · 1×
cac7.0.0 · 1×
eslint10.11.0 · 1×

For agents

$ claude mcp add electron-vite \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page