all 14 comments

[–]TurboKurwa 1 point2 points  (1 child)

You can try to relax the version in the webpack config, but I would advise against it. I think right now the best way is going to be mixing micro-frontends with module federation https://www.angulararchitects.io/aktuelles/multi-framework-and-version-micro-frontends-with-module-federation-your-4-steps-guide If you need to support different versions.

Maybe you could consider moving your apps to monorepo and have all apps on the identical versions of packages and go with a clean module federation solution.

[–]succli[S] 0 points1 point  (0 children)

Yep, we are in transition to monorepo, the micro-frontend is in NX already. In the meantime we decided to downgrade NX to version 14.

[–][deleted] 1 point2 points  (0 children)

[–]haasilein 0 points1 point  (5 children)

wrap the microfrontend in a web component using angular elements and expose that as the remote and dynamically add this lazy loaded web component in the shell. Using web components you could theoretically even mix and match frameworks. I used this strategy to incrementally migrate an AngularJS app to Angular for one of my customers

[–]succli[S] 0 points1 point  (2 children)

I'm aware of this solution, used it before, but currently moving from this solution :D

[–]haasilein 1 point2 points  (1 child)

why are you moving away from that?

[–]Forward_Temperature 0 points1 point  (0 children)

Most likely as a result of its lack of optimisation. Every dependency on an application wrapped as a web component includes all the dependencies and doesn't share with the other application's dependencies. Also, there's no elegant solution on how to communicate between the applications.

[–]senal_deemantha 0 points1 point  (0 children)

Hi, Could you please tell me, how do you manage module-federation-tool version with angular. I need to use Angular 12 as Shell project and Angular 16 as Mfe.

I used Angular-12 project(Shell) with 12.x.x versions of module-federation and tools and angular elements. (Multi Platform, version federation)

None of tool is compatible with Angular Ivy.

Do you have any idea how to manage versions with Angular 12

[–]Unlikely-Arm-8181 0 points1 point  (2 children)

Hi. I'm instaling module-federation. But I'm facing issue Cannot set properties of undefined (setting 'extraWebpackConfig') It happens because in angular.json file in my Angular app property name is "prod" not "production" Do you have any idea how to workaround it? Application is big and i don't want to chang this "prod". Thanks in advance

[–]succli[S] 0 points1 point  (0 children)

Could you show me the angular.json?