build: improved resource chunk

This commit is contained in:
鲁树人 2023-05-15 21:39:58 +01:00
parent c912b897ba
commit 67b87f685d

View File

@ -58,4 +58,15 @@ export default defineConfig({
'~': path.resolve(__dirname, 'src'), '~': 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'],
},
},
},
},
}); });