Reproduction of the bug/regression with instructions
We recently ran into the issue identified in #1113. This caused a production outage of our application.
TLDR:
- We deployed
v1.0 of _foo.<sameHash>.js which had import { z as x } from "@nf-internal/chunk-AAAAAAAA";, which loads chunk-AAAAAAAA.js
- Users loaded our app and their browsers cached
v1.0 of _foo.<sameHash>.js.
- We deployed
v1.1 of _foo.<sameHash>.js which had import { z as x } from "@nf-internal/chunk-BBBBBBBB";, which loads chunk-BBBBBBBB.js.
- Users loaded our app and since their browsers had a cached version
_foo.<sameHash>.js, their browsers then attempted to load chunk-AAAAAAAA.js and failed because either chunk-AAAAAAAA.js didn't exist in the v1.1 deployment, or because the contents of chunk-AAAAAAAA.js changed and doesn't match what v1.0 of _foo.<sameHash>.js expects.
Expected behavior
When file contents for any *.js file in the Angular build output changes, the filename should also change. If the filename doesn't change but the content does, users' browsers and/or CDNs will serve the stale cached content for the file's.
Since @festim-shyti already had a fix here, #1113, and then here, native-federation/native-federation-core#67, but the update was never merged, can the update be backported for v21 of @angular-architects/native-federation?
Versions of Module Federation, Angular, Node, Browser, and operating system
Native Federation: v21
Angular: v21
Node: v24
Other information
No response
I would be willing to submit a PR to fix this issue
Reproduction of the bug/regression with instructions
We recently ran into the issue identified in #1113. This caused a production outage of our application.
TLDR:
v1.0of_foo.<sameHash>.jswhich hadimport { z as x } from "@nf-internal/chunk-AAAAAAAA";, which loadschunk-AAAAAAAA.jsv1.0of_foo.<sameHash>.js.v1.1of_foo.<sameHash>.jswhich hadimport { z as x } from "@nf-internal/chunk-BBBBBBBB";, which loadschunk-BBBBBBBB.js._foo.<sameHash>.js, their browsers then attempted to loadchunk-AAAAAAAA.jsand failed because eitherchunk-AAAAAAAA.jsdidn't exist in thev1.1deployment, or because the contents ofchunk-AAAAAAAA.jschanged and doesn't match whatv1.0of_foo.<sameHash>.jsexpects.Expected behavior
When file contents for any
*.jsfile in the Angular build output changes, the filename should also change. If the filename doesn't change but the content does, users' browsers and/or CDNs will serve the stale cached content for the file's.Since @festim-shyti already had a fix here, #1113, and then here, native-federation/native-federation-core#67, but the update was never merged, can the update be backported for
v21of@angular-architects/native-federation?Versions of Module Federation, Angular, Node, Browser, and operating system
Native Federation: v21
Angular: v21
Node: v24
Other information
No response
I would be willing to submit a PR to fix this issue