import { defineConfig } from "vite"; // In dev, the Vite server runs on :5173 and proxies API/WS calls to the // Rust server on :7777 so the same fetch/WebSocket code works in both modes. // In `build`, the output goes to `dist/` which the Rust server statically serves. export default defineConfig({ build: { outDir: "dist", emptyOutDir: true, target: "es2022", }, server: { port: 5173, proxy: { "/healthz": "http://127.0.0.1:7777", "/api": "http://127.0.0.1:7777", "/ws": { target: "ws://127.0.0.1:7777", ws: true }, }, }, });