Skip to content

Commit

Permalink
Revert "more splitting"
Browse files Browse the repository at this point in the history
This reverts commit 6447e15.
  • Loading branch information
ShiboSoftwareDev committed Jan 11, 2025
1 parent 10f9aa3 commit 51d6360
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,23 @@ export default defineConfig(async (): Promise<UserConfig> => {
landing: path.resolve(__dirname, "landing.html"),
},
output: {
manualChunks(id) {
if (id.includes("node_modules/react/") ||
id.includes("node_modules/react-dom/")) {
return "vendor"
}

if (id.includes("node_modules/@codemirror/") ||
id.includes("node_modules/@tscircuit/") ||
id.includes("/pages/editor")) {
return "editor"
}

if (id.includes("node_modules/wouter/") ||
id.includes("node_modules/@radix-ui/")) {
return "vendor"
}
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",
],
},
},
},
Expand Down

0 comments on commit 51d6360

Please sign in to comment.