import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import { resolve } from 'path'; export default defineConfig({ plugins: [react()], root: 'client', build: { outDir: '../public/dist', emptyOutDir: true, rollupOptions: { output: { manualChunks: { 'lobehub-ui': ['@lobehub/ui'], 'antd': ['antd'], 'react-vendor': ['react', 'react-dom'], }, }, }, }, server: { port: 3001, proxy: { '/socket.io': { target: 'http://localhost:3000', ws: true, }, '/api': { target: 'http://localhost:3000', }, }, }, resolve: { alias: { '@': resolve(__dirname, './client/src'), }, }, optimizeDeps: { include: [ 'react', 'react-dom', 'antd', '@lobehub/ui', '@lobehub/fluent-emoji', 'antd-style', 'lucide-react', 'socket.io-client', ], }, });