import path from 'node:path' import tailwindcss from '@tailwindcss/vite' import react from '@vitejs/plugin-react' import { defineConfig } from 'vitest/config' // Dev: `npm run dev` serves the app on :5173 and forwards /api to the FastAPI backend // (uv run python -m coveragecheck.web.api, :8000). Production: `npm run build` writes // dist/, which FastAPI serves itself (one process, one port: SPEC Step 9). export default defineConfig({ plugins: [react(), tailwindcss()], resolve: { alias: { '@': path.resolve(import.meta.dirname, './src') } }, server: { proxy: { '/api': 'http://127.0.0.1:8000' } }, test: { environment: 'node', include: ['src/**/*.test.ts'] }, })