Skip to content

fix(rspack_plugin_mf): Track all referenced chunks#9707

Merged
ahabhgk merged 14 commits intomainfrom
mf-track-initial-chunks
Mar 19, 2025
Merged

fix(rspack_plugin_mf): Track all referenced chunks#9707
ahabhgk merged 14 commits intomainfrom
mf-track-initial-chunks

Conversation

@ScriptedAlchemy
Copy link
Contributor

Summary

Track initial chunks (entry point chunks) in the chunk mapping for remotes and consumes as well.

This is a prerequisite to be able to support async startup and remove needed import() at top of file.

"entry.client": ["webpack/sharing/consume/default/react-dom/react-dom?e236", "webpack/sharing/consume/default/react-dom/react-dom?852f"],

In webpack, we track all referenced chunks for single runtime chunk and multi entry based apps. Apps like next.js require us to track initial chunks so we can resolve entry requirements ahead of time without needing a import() to make the app run.

This does not implement asyncStartup runtime code, but does allow us to access the correct chunk maps as needed.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Mar 18, 2025
@netlify
Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 521195a
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67da4a410e82d50008f9714e

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 18, 2025

CodSpeed Performance Report

Merging #9707 will not alter performance

Comparing mf-track-initial-chunks (521195a) with main (e415b9d)

🎉 Hooray! codspeed-node just leveled up to 4.0.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 8 untouched benchmarks

@hardfist hardfist requested a review from ahabhgk March 18, 2025 14:07
@ScriptedAlchemy ScriptedAlchemy changed the base branch from main to mf-root-out-dir March 19, 2025 03:16
Base automatically changed from mf-root-out-dir to main March 19, 2025 04:04
@ahabhgk ahabhgk merged commit fef9234 into main Mar 19, 2025
31 checks passed
@ahabhgk ahabhgk deleted the mf-track-initial-chunks branch March 19, 2025 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants