packages/angular/docs/setup-mf-examples.md
The setup-mf generator is used to add Module Federation support to existing applications.
To convert an existing application to a host application, run the following
nx g setup-mf myapp --mfType=host --routing=true
To convert an existing application to a remote application, run the following
nx g setup-mf myapp --mfType=remote --routing=true
To convert an existing application to a remote application and attach it to an existing host application name myhostapp, run the following
nx g setup-mf myapp --mfType=remote --routing=true --host=myhostapp
To convert an existing application to a host application and attaching existing remote applications named remote1 and remote2, run the following
nx g setup-mf myapp --mfType=host --routing=true --remotes=remote1,remote2