A fast Electrobun desktop app template with Svelte 5 and Vite for hot module replacement (HMR).
# Install dependencies
bun install
# Development with HMR (recommended)
bun run dev
# Build for production
bun run build
# Build for production release
bun run build:prod
When you run bun run dev:
http://localhost:5173 with HMR enabledWhen you run bun run dev (without HMR):
views://mainview/index.htmlbun run build) to see changes├── src/
│ ├── bun/
│ │ └── index.ts # Main process (Electrobun/Bun)
│ └── mainview/
│ ├── App.svelte # Svelte app component
│ ├── main.ts # Svelte entry point
│ ├── index.html # HTML template
│ └── app.css # Global styles
├── electrobun.config.ts # Electrobun configuration
├── vite.config.ts # Vite configuration
├── svelte.config.js # Svelte configuration
└── package.json
This template uses Svelte 5 with the new runes syntax:
$state() - reactive state$derived() - computed values$effect() - side effectssrc/mainview/src/mainview/app.cssvite.config.tssrc/bun/index.tselectrobun.config.ts