Demonstrates the chunk optimizer regression introduced by #8371.
npm install rolldown@latest
node generate.mjs # generates src/ with 200 routes, 50 services, 20 utils
node build.mjs # builds and reports chunk countbash compare.sh| Version | Chunks | Common | Regression |
|---|---|---|---|
| rc.4 (before #8371) | 236 | 35 | — |
| rc.5 (after #8371) | 256 | 55 | +20 |
| rc.15 (latest) | 271 | 70 | +35 |
The project has 1 main entry that dynamically imports 200 route modules. Routes share services and utilities with overlapping dependencies.
The chunk optimizer should merge shared modules into existing entry chunks when safe. PR #8371 made the circular dependency check too conservative, blocking legitimate merges and creating extra common chunks.
See PR #9049 for the fix.