• Stars
    star
    3,206
  • Rank 14,009 (Top 0.3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Next generation Electron build tooling based on Vite 新一代 Electron 开发构建工具,支持源代码保护

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-configured for Electron, don't worry about configuration.
  • 💡 Optimize asset handling (Node.js addons, WebAssembly, Worker Thread, etc).
  • 🚀 Fast HMR for renderer processes.
  • 🔥 Hot reloading for main process and preload scripts.
  • 🔌 Easy to debug in IDEs like VSCode or WebStorm.
  • 🔒 Compile to v8 bytecode to protect source code.
  • 🏷️ Support for TypeScript decorators.
  • 📦 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

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

More Repositories

1

quick-start

An easy way to start a front-end project.
JavaScript
246
star
2

electron-vite-boilerplate

Comprehensive and security Electron template (TypeScript + Vue3 + Vite).
CSS
134
star
3

electron-toolkit

Toolkit for Electron
TypeScript
109
star
4

EvPlayer

Video player base on Electron
TypeScript
84
star
5

electron-uikit

UI kit for Electron. e.g. titlebar, contextmenu, notification, etc.
TypeScript
57
star
6

clipboard-files

A nodejs addon, read or write file paths for clipboard, supports win32 and mac osx.
C++
55
star
7

electron-conf

Simple data persistence for your Electron app - save and load user settings, app state, cache, etc
TypeScript
38
star
8

electron-micro-app

A mini program demo base on Electron (Electron桌面小程序)
Vue
29
star
9

node-signalr

A signalR client for node.js which support ASP.net but not ASP.net Core.
TypeScript
21
star
10

electron-vite-bytecode-example

electron-vite source code protection example
TypeScript
19
star
11

electron-swan

🦢 A cli tool for managing local Electron release artifacts
TypeScript
19
star
12

sqlite3-queries

A type-safe and promise-based query client for node sqlite3.
TypeScript
13
star
13

electron-vite-worker-example

electron-vite worker example
TypeScript
12
star
14

shadowizer

A cli tool for adding box shadow to images
JavaScript
12
star
15

vitepress-theme-vue

VitePress theme base on @vue/theme, more practical and comprehensive.
Vue
9
star
16

vite-plugin-electron-config

Electron plugin for Vite
TypeScript
7
star
17

wx-vue

Mobile UI Components based on Vue.js and WeUI
CSS
6
star
18

tiny-libs

Tiny front-end library monorepo.
TypeScript
6
star
19

electron-vite-decorator-example

electron-vite decorator example
TypeScript
4
star
20

overlayscrollbars-vue

The OverlayScrollbars wrapper for Vue3
Vue
2
star
21

node-sqlite3

Fork node-sqlite3, modified to use SQLCipher.
PLpgSQL
2
star
22

wx-vue-next

A Vue.js 3 Mobile UI component library based on the WeUI Design (WIP)
Less
1
star
23

vue-cli-plugin-wx-vue

wx-vue plugin for vue-cli
JavaScript
1
star
24

wx-vue-quick-start

Clone to try a simple wx-vue project
Vue
1
star
25

commit-lint

Lint commit messages using Angular's commit convention
JavaScript
1
star
26

ejst

A embedded javascript template engine for nodejs
JavaScript
1
star
27

eslint-config

Alex's ESLint config presets
1
star
28

electron-vite-docs

Documentation for electron-vite
Vue
1
star
29

wx-vue-preset

Vue CLI 3 preset for wx-vue
JavaScript
1
star
30

electron-builder-appimage-install-bash

A bash script to create integrated desktop for AppImage built by electron builder. Since electron builder 21 desktop integration is not a part of produced AppImage file.
Shell
1
star