Skip to content

Conversation

2heal1
Copy link
Member

@2heal1 2heal1 commented Sep 28, 2025

Summary

  1. Inject remotesInfos into __webpack_require__.federation.bundlerRuntimeOptions.remotes to help MF support lazy compilation

MF will update the remote chunkMapping and moduleMap with the updated module data . And it needs the remotesInfos which is generated at first build, so we need to inject it into bundler runtime to store it .

  1. always add consumesLoadingData if enable shared

HMR will proxy webapck_require , and MF bundler runtime can not get consumesLoadingData if not add for for the first time

  1. Add ensureChunk if enable lazy compilation

Related links

module-federation/core#4095

Checklist

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

@2heal1 2heal1 requested a review from hardfist as a code owner September 28, 2025 11:04
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Sep 28, 2025
Copy link

netlify bot commented Sep 28, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 5606ecd
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68dba7ff27ce360008eb6134

Copy link

codspeed-hq bot commented Sep 28, 2025

CodSpeed Performance Report

Merging #11779 will not alter performance

Comparing 2heal1:feat/inject-mf-remote-infos (7f2ab6d) with main (f72a069)1

Summary

✅ 17 untouched

Footnotes

  1. No successful run was found on main (e88f22d) during the generation of this report, so f72a069 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@2heal1 2heal1 requested a review from ahabhgk as a code owner September 30, 2025 02:32
@2heal1 2heal1 force-pushed the feat/inject-mf-remote-infos branch from 54c4e0c to 543e716 Compare September 30, 2025 09:43
@2heal1 2heal1 force-pushed the feat/inject-mf-remote-infos branch from 543e716 to cc42aca Compare September 30, 2025 09:45
@2heal1 2heal1 changed the title feat(mf): inject remoteInfos to support lazy compilation feat(mf): support lazy compilation Sep 30, 2025
@2heal1
Copy link
Member Author

2heal1 commented Sep 30, 2025

I will update the official MF version if the main logic is acceptable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant