perf: add Vite manualChunks for vendor code splitting
This commit is contained in:
@@ -31,4 +31,17 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'vendor-react': ['react', 'react-dom', 'react-router-dom'],
|
||||
'vendor-mui': ['@mui/material', '@mui/icons-material', '@emotion/react', '@emotion/styled'],
|
||||
'vendor-swiper': ['swiper/react', 'swiper/modules'],
|
||||
'vendor-query': ['@tanstack/react-query'],
|
||||
'vendor-effector': ['effector', 'effector-react'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user