Commit ccced29
perf(build): deduplicate plugin-sdk chunks to fix ~2x memory regression
Bundle all plugin-sdk entries in a single tsdown build pass instead of
38 separate builds. The separate builds prevented the bundler from
sharing common chunks, causing massive duplication (e.g. 20 copies of
query-expansion, 14 copies of fetch, 11 copies of logger).
Measured impact:
- dist/ size: 190MB → 64MB (-66%)
- plugin-sdk/ size: 142MB → 16MB (-89%)
- JS files: 1,395 → 789 (-43%)
- 5MB+ files: 27 → 7 (-74%)
- Plugin-SDK heap cost: +1,309MB → +63MB (-95%)
- Total heap (all chunks loaded): 1,926MB → 711MB (-63%)1 parent 592d932 commit ccced29
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments