fix(misc): filter shared libraries by import name in module federation helpers #15980
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theshared
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