build config
This commit is contained in:
parent
df422fc505
commit
a14e466c1f
|
|
@ -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"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue