Browse Source

:wrench: split vendor assets

Jeremy Zheng 1 week ago
parent
commit
679e0713ad
1 changed files with 12 additions and 0 deletions
  1. 12 0
      dashboard-v6/vite.config.ts

+ 12 - 0
dashboard-v6/vite.config.ts

@@ -11,5 +11,17 @@ export default defineConfig({
       "/api": "http://127.0.0.1:8000",
     },
   },
+  build: {
+    chunkSizeWarningLimit: 1000,
+    rollupOptions: {
+      output: {
+        manualChunks(id) {
+          if (id.includes("node_modules")) {
+            return "vendor";
+          }
+        },
+      },
+    },
+  },
   plugins: [react()],
 });