angular-architects / module-federation-plugin

MIT License
683 stars 184 forks source link

Native federation shell with microFE Angular 16 #536

Closed dessyg closed 1 week ago

dessyg commented 1 month ago

Hello team, Here there are 3 Angular projects with Native federations, set up for a POC task in our team.

the shell and one of remotes are with Angular 17: remote 1 https://github.com/dessyg/mfe1 https://github.com/dessyg/mfe1 shell - https://github.com/dessyg/microfe-shell and the other remote apps is created with Angular 16.2 https://github.com/dessyg/mf-angular-16 When build and run the applications, I am getting in the shell error when redirect to angualr 16 remote the following error for routing "packages/new-package": image Could it be a problem with the expose of the angular 16 module from mf-angular-16 app.

Thanks in advance!

Kind regards, Desislava

manfredsteyer commented 1 week ago

Hi,

if you want to mix and match different versions, you need to wrap them in a web component:

https://www.angulararchitects.io/blog/micro-frontends-with-modern-angular-part-2-multi-version-and-multi-framework-solutions-with-angular-elements-and-web-components/

Best wishes, Manfred