import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; const apiBase = process.env.API_URL ?? "http://localhost:8000"; const wsBase = apiBase.replace(/^http/, "ws"); export default defineConfig({ plugins: [react()], server: { port: 3000, proxy: { "/api": { target: apiBase, changeOrigin: true }, "/ws": { target: wsBase, ws: true }, }, }, test: { globals: true, environment: "jsdom", setupFiles: "./src/test/setup.ts", }, });