build: improved resource chunk

This commit is contained in:
鲁树人 2023-05-15 21:39:58 +01:00
parent 7d27a5fc96
commit e60e669d32

View File

@ -58,4 +58,15 @@ export default defineConfig({
'~': path.resolve(__dirname, 'src'),
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
reacts: ['react', 'react-dom', 'react-promise-suspense', 'react-redux', '@reduxjs/toolkit'],
chakra: ['@chakra-ui/icons', '@chakra-ui/react', '@emotion/react', '@emotion/styled', 'framer-motion'],
parakeet: ['@jixun/libparakeet'],
},
},
},
},
});