fix: polish playground routing and bundle splits
This commit is contained in:
@@ -72,4 +72,36 @@ export default defineConfig({
|
||||
entries: ['src/main.tsx'],
|
||||
exclude: ['satellite.js'],
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) {
|
||||
return
|
||||
}
|
||||
|
||||
if (id.includes('/@ant-design/icons/')) {
|
||||
return 'icons-vendor'
|
||||
}
|
||||
|
||||
if (
|
||||
id.includes('/react/') ||
|
||||
id.includes('/react-dom/') ||
|
||||
id.includes('/react-router-dom/') ||
|
||||
id.includes('/scheduler/')
|
||||
) {
|
||||
return 'react-vendor'
|
||||
}
|
||||
|
||||
if (id.includes('/axios/')) {
|
||||
return 'network-vendor'
|
||||
}
|
||||
|
||||
if (id.includes('/three/') || id.includes('/simplex-noise/') || id.includes('/satellite.js/')) {
|
||||
return 'earth-vendor'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user