codeburn/windows/vite.config.ts
iamtoruk b199af182e windows: import the Tauri tray app as the Windows menubar
Brings the Tauri 2.x tray popover from #1022 onto main as windows/, mirroring
mac/. Product name, bundle identifier, and version line up with the macOS
menubar (org.agentseal.codeburn-menubar, 0.9.20); the crate is renamed off
"desktop" so it no longer collides with the Electron app in app/.

Linux (ksni) stays compiled and dev-usable but is documented as experimental:
gnome/ is the shipping Linux surface.

The five src/ CLI commits on that branch are dropped - they re-implement a
daily-bucketing fix main already carries.
2026-08-18 04:00:59 -07:00

29 lines
992 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// Tauri expects a fixed dev-server port so the Rust webview can connect reliably. The
// `@tauri-apps/plugin-*` runtime expects these HMR + strictPort settings to mirror what
// `tauri dev` spawns; tweaking them breaks the IPC bridge on first boot.
const TAURI_DEV_PORT = 1420
export default defineConfig(async () => ({
plugins: [react()],
clearScreen: false,
server: {
port: TAURI_DEV_PORT,
strictPort: true,
host: process.env.TAURI_DEV_HOST || false,
hmr: process.env.TAURI_DEV_HOST
? { protocol: 'ws', host: process.env.TAURI_DEV_HOST, port: 1421 }
: undefined,
watch: {
ignored: ['**/src-tauri/**'],
},
},
envPrefix: ['VITE_', 'TAURI_ENV_*'],
build: {
target: process.env.TAURI_ENV_PLATFORM === 'windows' ? 'chrome105' : 'safari13',
minify: !process.env.TAURI_ENV_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_ENV_DEBUG,
},
}))