Skip to content

Commit

Permalink
rollup chunk splitting of large deps
Browse files Browse the repository at this point in the history
  • Loading branch information
bgentry committed Apr 20, 2024
1 parent 03e362a commit e30b1a9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@ import tsconfigPaths from "vite-tsconfig-paths";

// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
output: {
manualChunks: {
// use vite-bundle-visualizer to find good candidates for manual chunks:
dagrejs: ["@dagrejs/dagre"],
"react-dom": ["react-dom"],
reactflow: ["reactflow"],
},
},
},
},
plugins: [react(), TanStackRouterVite(), tsconfigPaths()],
});

0 comments on commit e30b1a9

Please sign in to comment.