import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import tailwindcss from '@tailwindcss/vite'; // https://vite.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], build: { // Build straight into the Go embed package so `go build` bundles the UI. // emptyOutDir is required because the target is outside the project root. outDir: '../internal/web/dist', emptyOutDir: true, }, server: { // Forward gateway routes to the Go server during `npm run dev`. proxy: { '/v1': 'http://localhost:8080', '/api': 'http://localhost:8080', '/auth': { target: 'http://localhost:8080', changeOrigin: false }, }, }, });