Spaces:
Sleeping
Sleeping
File size: 803 Bytes
cad548d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
// Build output goes to dist/
build: {
outDir: 'dist',
target: 'esnext',
sourcemap: false,
// Chunk splitting for better caching
rollupOptions: {
output: {
manualChunks: {
'three': ['three'],
'r3f': ['@react-three/fiber', '@react-three/drei'],
'react-vendor': ['react', 'react-dom'],
'state': ['zustand'],
},
},
},
// Increase chunk size warning limit for Three.js
chunkSizeWarningLimit: 3000,
},
optimizeDeps: {
include: ['three', '@react-three/fiber', '@react-three/drei', 'zustand', 'immer'],
},
server: {
port: 5173,
host: '0.0.0.0',
},
})
|