Add electron-builder packaging configuration

- Install electron-builder as dev dependency
- Configure build targets for macOS (dmg, zip), Windows (nsis, zip), and Linux (AppImage, deb)
- Add npm scripts for building unpacked app (dist:dir) and macOS packages (dist:mac)
- Set base path to "./" in production builds for proper asset loading in packaged app
- Fix index.html asset paths to use relative paths (./ prefix)
- Update README to document packaging commands and note unsigned/unnotarized status
This commit is contained in:
drelich
2026-04-05 22:39:04 +02:00
parent 06b4cc4514
commit 6e970f37ea
5 changed files with 3490 additions and 10 deletions

View File

@@ -5,8 +5,9 @@ import react from "@vitejs/plugin-react";
const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/
export default defineConfig(async () => ({
export default defineConfig(async ({ command }) => ({
plugins: [react()],
base: command === "build" ? "./" : "/",
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
//