import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // In dev the SPA runs on 5173 and the API on 8000; this proxy keeps every fetch // same-origin, so the code is identical to how nginx serves it in Docker. export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { '/api': { target: process.env.API_URL || 'http://localhost:8000', changeOrigin: true, }, }, }, })