electron-vite-boilerplate icon indicating copy to clipboard operation
electron-vite-boilerplate copied to clipboard

๐Ÿ“š Really simple Electron + Vite boilerplate.

electron-vite-boilerplate

A Electron + Vite boilerplate of the nature of learning.

ๅญฆไน ๆ€ง็š„ Electron + Vite ๆ ทๆฟๅทฅ็จ‹!

awesome-vite Required Node.JS >= v14.17.0 GitHub license GitHub stars

  • ๐Ÿ“ฆ Out of the box
  • ๐Ÿšš Include only necessary dependencies

screenshot

Run Setup

# clone the project
git clone https://github.com/electron-vite/electron-vite-boilerplate.git

# enter the project directory
cd electron-vite-boilerplate

# install dependency
npm install

# develop
npm run dev

Directory

Once dev or build npm-script executed will be generate named dist folder. It has children dir of same as packages folder, the purpose of this design can ensure the correct path calculation.

ไธ€ๆ—ฆ dev ๆˆ– build ๅ‘ฝไปคๆ‰ง่กŒ่ฟ‡ๅŽ๏ผŒๅฐ†ไผš็”ŸๆˆไธŽ packages ็›ธๅŒ็ป“ๆž„ dist ๆ–‡ไปถๅคน๏ผŒ่ฟ™ๆ ท่ฎพ่ฎก็š„็›ฎ็š„ๆ˜ฏไฟ้šœๆž„ๅปบๅŽ่ทฏๅพ„่ฎก็ฎ—็š„ๆญฃ็กฎๆ€งใ€‚

โ”œโ”€โ”€ dist                      After build, it's generated according to the "packages" directory
โ”‚   โ”œโ”€โ”€ main/
โ”‚   โ”œโ”€โ”€ preload/
โ”‚   โ””โ”€โ”€ renderer/
โ”‚
โ”œโ”€โ”€ scripts
โ”‚   โ”œโ”€โ”€ build.mjs             npm run build
โ”‚   โ””โ”€โ”€ watch.mjs             npm run dev
โ”‚
โ””โ”€โ”€ packages
    โ”œโ”€โ”€ main                  Main-process source code
    โ”‚   โ””โ”€โ”€ vite.config.ts
    โ”œโ”€โ”€ preload               Preload-scripts source code
    โ”‚   โ””โ”€โ”€ vite.config.ts
    โ””โ”€โ”€ renderer              Renderer-process source code
        โ””โ”€โ”€ vite.config.ts

FAQ