import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ // Dev: the Vite dev server (5173) proxies API/health/openapi to the .NET web host (5180). // Prod: `npm run build` emits ./dist, which the .NET publish step / Docker copies into wwwroot. export default defineConfig({ plugins: [react(), tailwindcss()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, server: { port: 5173, proxy: { '/api': { target: 'http://localhost:5180', changeOrigin: true }, '/health': { target: 'http://localhost:5180', changeOrigin: true }, '/openapi': { target: 'http://localhost:5180', changeOrigin: true }, }, }, })