angular-architects / module-federation-plugin

MIT License
713 stars 191 forks source link

nf - skip for peer dependencies not working / @microsoft/signalr #585

Open MarcelBariakGrenzebach opened 2 months ago

MarcelBariakGrenzebach commented 2 months ago

When I directly install @microsoft/signalr in the native federation project the ng serve throws errors. For the test, I created a simple provider where I do imports from @microsoft/signalr and then I use it in the AppComponent via DI. image image image

After I added @microsoft/signalr to the skip image

The ng serve working fine image

But when I created my own library where I installed @microsoft/signalr and moved my test Provider, the ng serve threw errors also when the @microsoft/signalr is in the skip area. The own library is created in a separate angular 18 project and published to the local registry.

image image image

I tried installing @microsft/signalr in a native federation project like devDependency and then also in dependency - but it did not help. image

Only helped when I added my tested library to the skip, but this is not a solution. I need to share my library between federated micro frontends how I do it currently with the module federation.

MarcelBariakGrenzebach commented 2 months ago

When I am using instead shareAll the share then I can serve the project image

MarcelBariakGrenzebach commented 2 months ago

Seems this has something to do also with this topic https://github.com/angular-architects/module-federation-plugin/issues/584#issuecomment-2185733642