import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // dashboard-v2 → served by `claw-store serve` under /v2/*. // Base path lines up with the cutover plan in docs/dashboard-v2.md. // During local dev the daemon proxies /api/v2/* on :7700 so // `vite dev` on :5173 can hit it via server.proxy. export default defineConfig({ // Absolute base matching the backend's actual mount point // (`serve.rs` nests the v2 static dir at `/v2` via // `nest_service("/v2", …)`). A prior `/clawstor/` base assumed a // Tailscale Serve path mapping that was never actually configured // on any node (checked `tailscale serve status` on tank + // architect: neither proxies a `/clawstor` path) — that base // silently broke direct `:7700/v2/` access, the only access // pattern that's actually live. base: '/v2/', plugins: [react()], server: { port: 5173, proxy: { '/api/v2': { target: 'http://127.0.0.1:7700', changeOrigin: true, }, }, }, build: { outDir: 'dist', emptyOutDir: true, }, });