1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/// <reference types="vitest/config" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// In development the SPA runs on Vite's dev server while the Go backend runs
// on :8888; the proxy below forwards the API and WebSocket routes to it. In
// production the Go binary serves the built SPA itself and no proxy exists.
export default defineConfig({
plugins: [react()],
server: {
proxy: {
"/ws": { target: "ws://localhost:8888", ws: true },
"/api": { target: "http://localhost:8888" },
"/healthz": { target: "http://localhost:8888" },
},
},
test: {
environment: "jsdom",
globals: true,
},
});
|