From e60e669d32a8bc444a20c1763c6801ec30dc202d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Mon, 15 May 2023 21:39:58 +0100 Subject: [PATCH] build: improved resource chunk --- vite.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index c31430f..6b24f18 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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'], + }, + }, + }, + }, });