electron-vite

Electron build tooling based on Vite

electron-vite downloads electron-vite version electron-vite license

electron-viteSimilar Packages:

Npm Package Weekly Downloads Trend

3 Years
🌟 Show real-time usage chart on electron-vite's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of electron-vite](https://npm-compare.com/img/npm-trend/THREE_YEARS/electron-vite.png)](https://npm-compare.com/electron-vite#timeRange=THREE_YEARS)

Cumulative GitHub Star Trend

🌟 Show GitHub stars trend chart on electron-vite's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of electron-vite](https://npm-compare.com/img/github-trend/electron-vite.png)](https://npm-compare.com/electron-vite)

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
electron-vite05,301105 kB724 months agoMIT

README for electron-vite

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:

JavaScriptTypeScript
vanillavanilla-ts
vuevue-ts
reactreact-ts
sveltesvelte-ts
solidsolid-ts

Contribution

See Contributing Guide.

License

MIT Β© alex.wei