Skip to content

Commit

Permalink
build: Configure manual chunks on build, to separate strudel/mercury/…
Browse files Browse the repository at this point in the history
…hydra/p5 from the rest
  • Loading branch information
munshkr committed Apr 2, 2024
1 parent c0f05cb commit f1c78a1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,23 @@ export default defineConfig({
},
}),
],
build: {
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes("@strudel/")) {
return "strudel";
} else if (id.includes("mercury-engine")) {
return "mercury";
} else if (id.includes("hydra-synth")) {
return "hydra";
} else if (id.includes("p5")) {
return "p5";
} else if (id.includes("node_modules")) {
return "vendor";
}
},
},
},
},
});

0 comments on commit f1c78a1

Please sign in to comment.