import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()], server: { // Native dev: api on localhost:3001 (3000 may be occupied by other // projects). Containerized dev overrides this via VITE_API_PROXY_TARGET. proxy: { '/api': process.env.VITE_API_PROXY_TARGET ?? 'http://localhost:3001', // The collab WebSocket (issue #36); `ws: true` upgrades the connection. '/collab': { target: process.env.VITE_COLLAB_PROXY_TARGET ?? 'http://localhost:3002', ws: true, }, }, }, });