import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], // npm workspace (D-15): shared packages are imported from source, so make // sure every import of React resolves to this app's copy. resolve: { dedupe: ['react', 'react-dom'], }, server: { host: '0.0.0.0', port: 5174, // Same as the waiter: the API is same-origin in production (nginx), so in // dev (and `vite preview`) forward it to the local backend. proxy: { '/api/ws': { target: 'ws://localhost:8000', ws: true, changeOrigin: true }, '/api': { target: 'http://localhost:8000', changeOrigin: true }, '/static': { target: 'http://localhost:8000', changeOrigin: true }, }, }, })