[Module Federation] Expose Native Federation fileName config option #31941
jberndsen-planon
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
All hooks work. Init or before load / before request just mutate the object values. Federation examples has a runtime plugins dir where i do that in a few examples for reference @jberndsen-planon |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context:
The @nx/module-federation package exposes the
ModuleFederationConfig
interface, which abstracts the underlying Webpack/Rspack configuration passed to @module-federation/enhanced. However, this abstraction currently hides thefileName
property (reference).Problem:
With the recommendation of using
mf-manifest.json
as the preferred method for initializing Micro Frontends, there is a need to cache-bust the generatedremoteEntry.mjs
. The preferred approach is to append a chunkhash to the filename (e.g.,remoteEntry.[chunkhash].mjs
) and ensure this is reflected in the generatedmf-manifest.json
.Current Workarounds Considered:
Feature Request:
Expose the fileName property in ModuleFederationConfig to allow customization of the remoteEntry filename, including support for chunkhash. This would enable proper cache busting when also correctly reflected in mf-manifest.json.
Beta Was this translation helpful? Give feedback.
All reactions