-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
46 lines (45 loc) · 1.62 KB
/
Copy pathvite.config.ts
File metadata and controls
46 lines (45 loc) · 1.62 KB
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
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { mujocoReact } from 'mujoco-react/vite';
import path from 'path';
export default defineConfig({
plugins: [
mujocoReact({
models: {
quadrotor: 'public/models/quadrotor/scene.xml',
franka: 'public/models/franka_emika_panda/scene.xml',
so101OverheadBimanual: 'public/models/so101_overhead_bimanual/so101_overhead_bimanual.xml',
xlerobot: 'public/models/xlerobot/xlerobot.xml',
spot: 'public/models/boston_dynamics_spot/scene.xml',
g1: 'public/models/unitree_g1/scene.xml',
},
}),
tailwindcss(),
react(),
],
build: {
// The Spark (gaussian-splat) lazy chunk is ~5 MB by nature; keep the limit
// above it so the example build stays warning-clean.
chunkSizeWarningLimit: 6000,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules/@react-three/')) return 'r3f';
if (id.includes('node_modules/three/')) return 'three';
},
},
},
},
resolve: {
dedupe: ['react', 'react-dom', 'three', '@react-three/fiber', '@react-three/drei'],
alias: {
react: path.resolve('./node_modules/react'),
'react-dom': path.resolve('./node_modules/react-dom'),
'three/addons': path.resolve('./node_modules/three/examples/jsm'),
three: path.resolve('./node_modules/three'),
'@react-three/fiber': path.resolve('./node_modules/@react-three/fiber'),
'@react-three/drei': path.resolve('./node_modules/@react-three/drei'),
},
},
});