import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // Backend URL for proxy (default to localhost for local dev) const BACKEND_URL = process.env.BACKEND_URL || 'http://localhost:8000' export default defineConfig({ plugins: [react()], server: { proxy: { '/api': { target: BACKEND_URL, changeOrigin: true, secure: false, }, '/ws': { target: BACKEND_URL.replace(/^http/, 'ws'), ws: true, changeOrigin: true, secure: false, }, }, }, })