perf: reduce js size

This commit is contained in:
ReaJason
2025-06-26 22:31:05 +08:00
parent e0425613ca
commit 0aabbfa937
12 changed files with 45 additions and 25 deletions
+15
View File
@@ -11,4 +11,19 @@ export default defineConfig({
"@": path.resolve(__dirname, "./src"),
},
},
build: {
rollupOptions: {
output: {
manualChunks: {
highlight: ["react-syntax-highlighter"],
radixUi: ["radix-ui"],
motion: ["framer-motion", "motion"],
sonner: ["sonner"],
yup: ["yup"],
i18n: ["react-i18next", "i18next"],
reactRouter: ["react-router", "react-router-dom"],
},
},
},
},
});