import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // In production (Docker build) VITE_BASE_PATH=/networkview/ is injected. // In development it falls back to '/' so the dev server works as-is. const basePath = process.env.VITE_BASE_PATH ?? '/'; export default defineConfig({ plugins: [react()], base: basePath, server: { port: 5173, proxy: { '/api': { target: 'http://localhost:3001', changeOrigin: true, }, }, }, build: { outDir: 'dist', }, });