fix: content-hash bootstrap entry asset#751
Merged
gioboa merged 1 commit intoMay 28, 2026
Merged
Conversation
Bootstrap entry was emitted as `mf-entry-bootstrap-${index}.js` with no
content hash. Since this file is referenced from `index.html` as the app
entry, stale browser/CDN caches kept serving the old bootstrap after deploys,
breaking app load until caches expired.
Append a short sha256 hash of the bootstrap source to the filename
(`mf-entry-bootstrap-${index}-${hash}.js`) so it participates in the
normal cache-busting flow alongside every other built asset.
Fixes module-federation#750
commit: |
gioboa
approved these changes
May 28, 2026
Collaborator
gioboa
left a comment
There was a problem hiding this comment.
Thanks @cschroeter
That's simply amazing 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
mf-entry-bootstrap-0.jsis referenced fromindex.htmlbut never invalidates in browser/CDN caches after a deploy, breaking app load until caches expire.mf-entry-bootstrap-<index>-<hash>.jsshape.Fixes #750
Before
After
Test plan
pnpm test(417 passing)pnpm typecheckpluginAddEntrybuild-mode test updated to assert the new filename shape and that the HTML references the hashed bootstrap