ArcherGu / fast-vite-electron

Vite + Electron with esbuild, so fast! ⚡

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

⚡Vite + Electron & Doubleshot Template

This template is used to build vite + electron projects. Build with Doubleshot, crazy fast!

🎉 Doubleshot is a whole new set of tools to help you quickly build and start a node backend or electron main process.

This template is based on a small framework einf that I wrote myself, which may not be complete, if you want to apply to production, you can use the templates with integrated nest.js:

Features


  • 😎 Controllers/Services ipc communication, powered by Typescript decorators.

  • ⚡ Rendering process is powered by Vite.

Motivation

In the past, I've been building desktop clients with vue + vue-cli-plugin-electron-builder, and they work very well. But as the project volume grows, webpack-based build patterns become slower and slower.

The advent of vite and esbuild greatly improved the development experience and made me feel lightning fast ⚡.

It took me a little time to extract this template and thank you for using it.

How to use

  • Click the Use this template button (you must be logged in) or just clone this repo.
  • In the project folder:
    # install dependencies
    yarn # npm install
    
    # run in developer mode
    yarn dev # npm run dev
    
    # build
    yarn build # npm run build

Note for PNPM

In order to use with pnpm, you'll need to adjust your .npmrc to use any one the following approaches in order for your dependencies to be bundled correctly (ref: #6389):

node-linker=hoisted
public-hoist-pattern=*
shamefully-hoist=true

Relative

My blog post:

About

Vite + Electron with esbuild, so fast! ⚡

License:MIT License


Languages

Language:TypeScript 78.5%Language:Vue 12.8%Language:JavaScript 5.8%Language:HTML 2.9%