import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], base: '/', build: { outDir: '../static/v2', // still build to v2/ first, then we copy emptyOutDir: true, chunkSizeWarningLimit: 300, rollupOptions: { output: { manualChunks: { react: ['react', 'react-dom'], }, }, }, }, server: { port: 5173, proxy: { '/api': { target: 'http://localhost:8765', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), ws: true, }, }, }, })