There is my issue :
I'm currently busy to discover angular app NX mono repo with dynamic module federation.
This is my structure :
- shellApp => Shell
- remote-1 => Remote MF
- remote-2 => Remote MF
I would like to make something like that:
Url /citizen gives me remote-1 MF
Url /citizen/xxx gives me remote-2 MF (and remote-1 of course )
There is my current routing config from shellApp :
export const appRoutes: Route[] = [
{
path: '',
redirectTo: 'citizen',
pathMatch: 'full',
},
{
path: 'citizen',
loadChildren: () =>loadRemoteModule('remote-1', './Module').then((m) => m.RemoteEntryModule),
},
This works perfectlly.
But when I try to make the same config in my remote-1 to have this kind of url (see bellow)
remote-entry/entry.routes.ts from remote-1 MF
{
path: 'xxx',
loadChildren: () =>loadRemoteModule('remote-2', './Module').then((m) => m.RemoteEntryModule),
}
The consoles gives me following error.
core.mjs:10183 ERROR Error: Uncaught (in promise): Error: Call setRemoteDefinitions or setRemoteUrlResolver to allow Dynamic Federation to find the remote apps correctly. Error: Call setRemoteDefinitions or setRemoteUrlResolver to allow Dynamic Federation to find the remote apps correctly. at nx-angular-mf.mjs:30:15
I still checked that my remote-2 config is correct by doing the following test in Shell and it works:
{
path: 'xxx',
loadChildren: () =>
loadRemoteModule('remote-2', './Module').then((m) => m.RemoteEntryModule),
},
Is it possible for a remote app to use in his routing another remote app ?