/// import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; // The page is served from the root of its own loopback port, and from // nowhere else, so there is no subpath to be agnostic about. export default defineConfig({ build: { outDir: "dist" }, plugins: [react()], server: { // `pnpm dev` talks to the real management app rather than a mock: the // guard refuses anything whose Host is not loopback, so the proxy has // to preserve it. proxy: { "/api": "http://127.0.0.1:8140" }, }, test: { coverage: { // No exclude list. This repository's rule is that coverage omits are // suppressions, and "the bootstrap is hard to test" is the same // sentence as "this line is untested" -- so main.tsx is a shim thin // enough to test in jsdom instead. include: ["src/**/*.{ts,tsx}"], provider: "v8", thresholds: { branches: 100, functions: 100, lines: 100, statements: 100, }, }, environment: "jsdom", globals: true, setupFiles: ["./src/test/setup.ts"], }, });