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:
@@ -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`
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user