import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // In development Vite serves the app and proxies the API to the Python backend, // so the two can be worked on independently. In production the built bundle is // copied into the backend image and served from the same origin. export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { "/api": { target: process.env.VITE_API_TARGET ?? "http://localhost:8080", changeOrigin: true, }, }, }, build: { outDir: "dist", sourcemap: false }, });