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

PeerDependencies are not passed through to remote if shell is not using it #731

Open
2 tasks
Kawachen97 opened this issue Jan 14, 2025 · 0 comments
Open
2 tasks

Comments

@Kawachen97
Copy link

With what library do you have an issue?

native-federation

Reproduction of the bug/regression with instructions

Hey,
we are using a package that needs some peerDependencies to work properly. Our shell is not using the components that need the peerDependency. We don't know which of those peerDepenencies will be needed by the remote and therefor also don't know which of them to install. We also want to prevent installing and sharing all of them. On startup, native-federation fails, while resolving the dependencies, which are declared as peer:
image (13)
As a workaround we are now skipping those subpackages in the federation.config:
image (14)

Expected behavior

My expectation would be, that those peerDependency constraints are passed through to the remote.
If the remote needs them, it can install them and if not, then not.

Versions of Native/Module Federation, Angular, Node, Browser, and operating system

NativeFederation: 18
Angular: 18

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant