Skip to content

Commit

Permalink
more splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiboSoftwareDev committed Jan 11, 2025
1 parent 6409fa4 commit 6447e15
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ export default defineConfig(async (): Promise<UserConfig> => {
landing: path.resolve(__dirname, "landing.html"),
},
output: {
manualChunks: {
vendor: [
"react",
"react-dom",
"wouter",
"@radix-ui/react-dialog",
"@radix-ui/react-dropdown-menu",
"@radix-ui/react-toast",
"@codemirror/state",
"@codemirror/view",
"@codemirror/lang-javascript",
],
editor: [
"@tscircuit/3d-viewer",
"@tscircuit/pcb-viewer",
"@tscircuit/schematic-viewer",
],
manualChunks(id) {
if (
id.includes("node_modules/@codemirror/") ||
id.includes("node_modules/@tscircuit/") ||
id.includes("/pages/editor")
) {
return "editor"
}

if (
id.includes("node_modules/react/") ||
id.includes("node_modules/react-dom/") ||
id.includes("node_modules/wouter/") ||
id.includes("node_modules/@radix-ui/")
) {
return "vendor"
}
},
},
},
Expand Down

0 comments on commit 6447e15

Please sign in to comment.