Add SetupPage, LoginPage, DashboardPage, ProjectsPage, ExperimentPage, LivePage, ComparePage, and AdminPage as placeholder components. Wire up react-router-dom routing in App.tsx with BrowserRouter in main.tsx. Unknown routes redirect to dashboard. Install vitest + @testing-library/react and add 9 routing tests. Build passes cleanly.
25 lines
488 B
TypeScript
25 lines
488 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
outDir: "dist",
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": "http://localhost:8000",
|
|
"/ws": {
|
|
target: "ws://localhost:8000",
|
|
ws: true,
|
|
},
|
|
"/health": "http://localhost:8000",
|
|
},
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/test-setup.ts"],
|
|
},
|
|
});
|