Electron Turborepo monorepo with pnpm, Vue, Vite boilerplate
Electron Turborepo monorepo with pnpm, Vue, Vite boilerplate
A production-ready Electron desktop application template built with Vue 3 + Vite + TypeScript, managed as a monorepo with pnpm workspaces and Turborepo.
…apps/electron (electron-main)
├── @repo/electron-preload
└── @repo/shared-types
apps/preload (@repo/electron-preload)
└── @repo/shared-types
apps/web (electron-web)
├── @repo/electron-preload
└── @repo/shared-types
packages/backend-api (@roxy/backend-api)
└── peer: axios
packages/shared-types (@repo/shared-types) # Leaf package, type definitions
packages/vite-plugin (@repo/vite-plugin) # Standalone, obfuscation + minificationTip: This project uses Volta to manage Node.js and pnpm versions. If you have Volta installed, the correct versions will be used automatically.
git clone https://github.com/buqiyuan/electron-vite-monorepo.git
cd electron-vite-monorepopnpm installpnpm devThis will:
--inspect flagIf you are in China, you can use the Taobao npm mirror for faster downloads. Uncomment the following lines in .npmrc:
registry = https://registry.npmmirror.comFor Electron binary downloads, run:
pnpm config set electron_mirror "https://npmmirror.com/mirrors/electron/"Or set environment variables:
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/| Command | Description |
|---|---|
pnpm dev |
Start all apps in development mode with HMR |
pnpm build |
Build all packages and apps via Turborepo |
pnpm pack:dev |
Build and package Electron app (development) |
pnpm pack:prod |
Build and package Electron app (production) |
pnpm lint |
Run ESLint across all packages |
pnpm lint:fix |
Auto-fix ESLint issues |
pnpm clean:cache |
Clear build caches |
pnpm clean:lib |
Remove all node_modules directories |
pnpm reinstall |
Clean lock file and reinstall all dependencies |
| Category | Technology |
|---|---|
| Desktop Framework | Electron 40 |
| Frontend Framework | Vue 3 |
| Build Tool | Vite 7 |
| Language | TypeScript 5 |
| Monorepo | pnpm Workspaces + Turborepo |
| Linting | ESLint (with @antfu/eslint-config) |
| Packaging | electron-builder |
| Auto Update | electron-updater |
No open issues yet, or sync has not completed.