You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name field in module-federation.config.js is used to search the project dependency graph to find project dependencies, which are used to generate shared module configuration for webpack. If the name does not match a project name, currently an empty set of dependencies is returned without error, resulting in no libraries being configured for sharing. Instead, an error should be thrown.
Motivation
This will enforce that the name field must match a project name and prevent hard-to-debug module federation issues.
Suggested Implementation
In getModuleFederationConfig, before calling getDependentPackagesForProject, check if mfConfig.name is a key in the projectGraph. If not, throw an error and abort the build.
The text was updated successfully, but these errors were encountered:
Description
The name field in module-federation.config.js is used to search the project dependency graph to find project dependencies, which are used to generate shared module configuration for webpack. If the name does not match a project name, currently an empty set of dependencies is returned without error, resulting in no libraries being configured for sharing. Instead, an error should be thrown.
Motivation
This will enforce that the name field must match a project name and prevent hard-to-debug module federation issues.
Suggested Implementation
In getModuleFederationConfig, before calling getDependentPackagesForProject, check if mfConfig.name is a key in the projectGraph. If not, throw an error and abort the build.
The text was updated successfully, but these errors were encountered: