A fast Electrobun desktop app template with React, Tailwind CSS, and Vite for hot module replacement (HMR).
# Install dependencies
bun install
# Development without HMR (uses bundled assets)
bun run dev
# Development with HMR (recommended)
bun run dev:hmr
# Build for production
bun run build
# Build for production release
bun run build:prodWhen you run bun run dev:hmr:
- Vite dev server starts on
http://localhost:5173with HMR enabled - Electrobun starts and detects the running Vite server
- The app loads from the Vite dev server instead of bundled assets
- Changes to React components update instantly without full page reload
When you run bun run dev (without HMR):
- Electrobun starts and loads from
views://mainview/index.html - You need to rebuild (
bun run build) to see changes
├── src/
│ ├── bun/
│ │ └── index.ts # Main process (Electrobun/Bun)
│ └── mainview/
│ ├── App.tsx # React app component
│ ├── main.tsx # React entry point
│ ├── index.html # HTML template
│ └── index.css # Tailwind CSS
├── electrobun.config.ts # Electrobun configuration
├── vite.config.ts # Vite configuration
├── tailwind.config.js # Tailwind configuration
└── package.json
- React components: Edit files in
src/mainview/ - Tailwind theme: Edit
tailwind.config.js - Vite settings: Edit
vite.config.ts - Window settings: Edit
src/bun/index.ts - App metadata: Edit
electrobun.config.ts