build config

This commit is contained in:
pqcqaq 2024-07-16 12:20:01 +08:00
parent df422fc505
commit a14e466c1f
1 changed files with 11 additions and 0 deletions

View File

@ -3,4 +3,15 @@ import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
build: {
rollupOptions: {
output: {
// manualChunks 配置
manualChunks: {
// 将 React 相关库打包成单独的 chunk 中
"react-vendor": ["react", "react-dom"],
},
},
},
},
});