import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import path from 'path' export default defineConfig({ plugins: [react()], resolve: { alias: { '@': path.resolve(__dirname, './src'), }, }, server: { port: 3000, proxy: { '/api': { target: 'http://localhost:8090', changeOrigin: true, }, '/ws': { target: 'ws://localhost:8091', ws: true, }, }, }, build: { outDir: 'dist', sourcemap: true, rollupOptions: { output: { // Monaco is bundled rather than fetched from a CDN so the app works // offline, and it dwarfs the app itself. Kept in its own file it is // downloaded once and stays cached while the app is redeployed. manualChunks: { monaco: ['monaco-editor/esm/vs/editor/editor.api'], }, }, }, chunkSizeWarningLimit: 1500, }, })