angular-architects / module-federation-plugin

MIT License
683 stars 184 forks source link

Reloading custom manifest with native federation #496

Closed parker-mike closed 2 months ago

parker-mike commented 2 months ago

The ReadMe of Native Federation for Angular states, that to switch over, from @angular-architects/module-federation to @angular-architects/native-federation, we have just to make sure we import everything from the later package, since it uses the same API as @angular-architects/module-federation. Unfortunately it seems to be not as straight forward as said:

  1. Can you please provide some clarifications on how to achieve the same behavior as described in Dynamic Module Federation with Angular in the Going "Dynamic Dynamic" section, with Custom Configuration Types, Custom Manifest Metadata, Dynamically Creating Routes etc.?
  2. Can we reload manifest at a later point in case it's being provided by a backend(e.g. with a list of plugins)?
  3. It looks that loadRemoteEntry can be replaced with loadRemoteModule with a LoadRemoteModuleOptions as parameter, am I right?
R4ZuL commented 2 months ago

I would also be grateful for an example where you can see the creation of dynamic routes

manfredsteyer commented 2 months ago

Hi,

ad 1) Please find an example here: https://www.angulararchitects.io/blog/micro-frontends-with-modern-angular-part-2-multi-version-and-multi-framework-solutions-with-angular-elements-and-web-components/

ad 2) That's right. Instead of loadManifest and setManifest, you can use the overloads of initFederation

ad 3) Yes, that's right

Best wishes, Manfred