Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(misc): filter shared libraries by import name in module federation helpers #15980

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Mar 30, 2023

Current Behavior

The initial shared filter pass for workspace libraries uses the project name (e.g. lib1), while the second pass uses the import name (e.g. @my-org/lib1). This inconsistency causes the shared function logic to either be right for the first pass or the second, unless folks consider both possible names.

Expected Behavior

The shared function should receive a consistent library name for its execution.

We're sticking with the import name because it's what's used by webpack Module Federation and was the original behavior before the first pass was added where the project name was wrongly used.

Related Issue(s)

Fixes #15975

@leosvelperez leosvelperez self-assigned this Mar 30, 2023
@vercel
Copy link

vercel bot commented Mar 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Mar 30, 2023 at 2:06PM (UTC)

@leosvelperez leosvelperez marked this pull request as ready for review March 30, 2023 14:44
@barrymichaeldoyle
Copy link
Contributor

Looking forward to seeing this merged 👍 Was worried we wouldn't be able to update nx, but this looks like it solves it!

@leosvelperez leosvelperez merged commit 5c33797 into nrwl:master Mar 31, 2023
@leosvelperez leosvelperez deleted the mf/fix-shared-early-filter branch March 31, 2023 14:45
@barrymichaeldoyle
Copy link
Contributor

Hmmm, it still doesn't work in 15.9.2 😞

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

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 github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shared code not being shared among host and remote in MFE
4 participants