angular-architects / module-federation-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reloading custom manifest with native federation

parker-mike opened this issue · comments

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:

  • the initFederation lacks the skipRemoteEntries argument.
  • the getManifest, loadManifest and the setManifest seems to also be missing.
  • the same with loadRemoteEntry.
  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?

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

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