import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { port: 3000, proxy: { '/api': { target: 'http://localhost:8000', changeOrigin: true, }, }, }, // Force consistent pre-bundling of deps that have CJS/ESM interop issues optimizeDeps: { include: [ 'react', 'react-dom', 'react-dom/client', '@react-three/fiber', '@react-three/drei', '@react-three/postprocessing', 'three', ], // Ensure all deps are processed in a single pass force: true, }, })