fix(module-federation): re-add support for mf aliases
Current Behavior
At some point in time, we had support for Module Federation aliases, and I noticed some of our examples broke in the latest versions of Nx.
This is an attempt to regain that support with some normalization of Module Federation project names.
Expected Behavior
We need to have the mapping back of aliases in the format:
const mfConfig = {
// ...
"@nx-mf/remote": "_nx_mf_remote@http://localhost:3001",
// ...
}
Related Issue(s)
https://github.com/nrwl/nx/issues/31346
Fixes #
Add a function specific to parse Federated names into resolvable JavaScript vars.
Use this function in every place a str.replace(/-/, '_') is being used.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nx-dev | 🛑 Canceled (Inspect) | Aug 1, 2025 3:09pm |
View your CI Pipeline Execution ↗ for commit 2b295cfb51e4fbc216ef17ef2820536dcceb876b
| Command | Status | Duration | Result |
|---|---|---|---|
nx documentation |
⏳ In Progress | ... | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-08-01 15:41:13 UTC
Sorry guys, I didn't rebase properly, so it didn't identify the branch update the way it should have. The CODEOWNERS automation ended up requesting everyone's review.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.