import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' // The dev server proxies the API + health endpoints to the Go backend so the SPA is same-origin. // Override the backend with the MM_BACKEND env var. const backend = process.env.MM_BACKEND ?? 'http://localhost:8090' export default defineConfig({ plugins: [react(), tailwindcss()], server: { port: 5180, proxy: { '/api': { target: backend, changeOrigin: true }, '/healthz': { target: backend, changeOrigin: true }, }, }, })