refactored DreamPage
to use lazy loading with Suspense
for charts and media, modularized chart components into DreamCharts.tsx
using d3
, and optimized build by grouping libraries into separate chunks in vite.config.ts
Signed-off-by: Matthias Puchstein <matthias@puchstein.bayern>
This commit is contained in:
@@ -8,4 +8,34 @@ export default defineConfig({
|
||||
react(),
|
||||
tailwindcss()
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
// Group Three.js related libraries
|
||||
'three-bundle': [
|
||||
'three',
|
||||
'@react-three/fiber',
|
||||
'@react-three/drei',
|
||||
'three-stdlib'
|
||||
],
|
||||
// D3 visualization library
|
||||
'd3': ['d3'],
|
||||
// Slider related libraries
|
||||
'slider': [
|
||||
'react-slick',
|
||||
'slick-carousel'
|
||||
],
|
||||
// React and related libraries
|
||||
'react-vendor': [
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-router-dom'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// Increase the warning limit to avoid unnecessary warnings
|
||||
chunkSizeWarningLimit: 1000
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user