manfredsteyer / module-federation-with-angular-dynamic

Dynamic Module Federation with Angular
122 stars 68 forks source link

Why Mfe1 app.module.ts(root module) not able to configure in webpack instead of specific modules #61

Open Sakol538 opened 2 years ago

Sakol538 commented 2 years ago

I tried in webpack.config.ts: instead of

exposes: {
    './Module': './projects/mfe1/src/app/users/users.module.ts',
},

replaced with

exposes: {
    './Module': './projects/mfe1/src/app/app.module.ts',
},

main shell i provided the

{
    path: 'users',
    loadChildren: () =>
      loadRemoteModule({
        type: 'manifest',
        remoteName: 'mfe1',
        exposedModule: './Module'
      }).then((m) => m.AppModule),
  }

accessing the main application but i get as shown screenshot error?

image