nx icon indicating copy to clipboard operation
nx copied to clipboard

fix(module-federation): re-add support for mf aliases

Open ryok90 opened this issue 6 months ago • 2 comments

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.

image

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.

ryok90 avatar May 26 '25 21:05 ryok90

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

vercel[bot] avatar May 26 '25 21:05 vercel[bot]

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

nx-cloud[bot] avatar Jun 11 '25 15:06 nx-cloud[bot]

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.

ryok90 avatar Jul 29 '25 19:07 ryok90

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.

github-actions[bot] avatar Aug 07 '25 00:08 github-actions[bot]