/// import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // The SPA is served by the FastAPI dashboard (agent_team/dashboard.py) from // web/dist at LAN :8770. In dev, proxy /api to a locally running dashboard so // `npm run dev` talks to real data without CORS. No CDN — everything bundles // locally (the dashboard is offline/LAN-only). export default defineConfig({ plugins: [react()], build: { outDir: "dist", emptyOutDir: true, sourcemap: false, }, server: { proxy: { "/api": { target: process.env.AGENT_TEAM_DASH || "http://127.0.0.1:8770", changeOrigin: true, }, }, }, test: { globals: true, environment: "jsdom", setupFiles: ["./src/test/setup.ts"], css: false, }, });