Repository navigation
fix(chunk-import-map): keep common chunk keys unique when enabling inline common chunks - #11230
Conversation
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
444c2ba to
1669606
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will not alter performance
|
Merge activity
|
…line common chunks (#11230) Common chunks that share a name can get duplicate import-map keys when inlining copies a shared module into them. This PR keeps each import mapped to its intended file. In #11168, the entry importing both `b/shared.js` and `c/shared.js` prints: Before: ```text e3 B:tiny11264 B:tiny11264 ``` After: ```text e3 B:tiny11264 C:tiny11264 ``` Inlining adds the same tiny module to several chunks' public module lists. The address calculation can then select the same minimum module ID for multiple chunks, and one import-map entry overwrites another. The first common chunk with a given name keeps its name-derived key. Later chunks with that name use the smallest resolved module ID among their original members, before inlining. Native render hooks expose those members; public metadata includes every printed copy. Keys with inlining disabled stay unchanged. Fixes #11168. Closes #11226.
dcb353f to
3f03741
Compare
## [1.2.15] - 2026-10-21 ### 🚀 Features - rolldown_plugin_vite_resolve: add `isBundled` to pick the browser-external stub format (#11260) by @h-a-n-a - dev: mark entry modules in the HMR module graph (#11252) by @h-a-n-a - mark module starts with `// <id>` comments instead of `#region` pairs (#11235) by @IWANABETHATGUY ### 🐛 Bug Fixes - plugin: stop `this.resolve` recursion between plugins with `skipSelf: true` (#11181) by @anzal1 - rolldown_plugin_vite_resolve: handle external `require` for `ssr.target: 'webworker'` (#11205) by @sapphi-red - rolldown_plugin_vite_build_import_analysis: only wrap dynamic imports with static specifiers in __vitePreload (#10879) by @smeng9 - strict-execution-order: wrap eager modules that forward wrapped definers (#11186) by @hyfdev - chunk-import-map: keep common chunk keys unique when enabling inline common chunks (#11230) by @hyfdev - only register signal-exit handler when a trace subscriber is active (#11208) by @DaniilIsupov ### 🧪 Testing - fold hand-unrolled Rust test tables (#11212) by @Brooooooklyn ### ⚙️ Miscellaneous Tasks - deps: upgrade oxc to 0.155.0 (#11228) by @Dunqing - rollup-tests: retriage failed tests (#11251) by @sapphi-red - deps: update rollup submodule for tests to v4.64.12 (#11249) by @rolldown-guard[bot] - deps: update test262 submodule for tests (#11242) by @rolldown-guard[bot] ### ❤️ New Contributors * @anzal1 made their first contribution in [#11181](#11181) * @smeng9 made their first contribution in [#10879](#10879) * @DaniilIsupov made their first contribution in [#11208](#11208) Co-authored-by: shulaoda <[email protected]>
Common chunks that share a name can get duplicate import-map keys when inlining copies a shared module into them. This PR keeps each import mapped to its intended file.
In #11168, the entry importing both
b/shared.jsandc/shared.jsprints:Before:
After:
Inlining adds the same tiny module to several chunks' public module lists. The address calculation can then select the same minimum module ID for multiple chunks, and one import-map entry overwrites another.
The first common chunk with a given name keeps its name-derived key. Later chunks with that name use the smallest resolved module ID among their original members, before inlining. Native render hooks expose those members; public metadata includes every printed copy. Keys with inlining disabled stay unchanged.
Fixes #11168. Closes #11226.