manfredsteyer / module-federation-with-angular-dynamic

Dynamic Module Federation with Angular
121 stars 67 forks source link

is that possible for two different docker instance based angular projects (mfe1 and mfe2) configured in a shell app and communication? #59

Open Sakol538 opened 1 year ago

Sakol538 commented 1 year ago

@manfredsteyer, new to module federation concept in webpack configurations trying with two different instances of modular Fédération Konfiguration in webpack( remote in one project and expose from onther project of angular) but there is no communication between each other. If its possible, please provide some referance examples of modular federation (instead of monolethic approach) As likely provided for react and angular project integration and communication

{
    path: 'react',
    component: WebComponentWrapper,
    data: {
      type: 'script',
      remoteEntry:
        'https://witty-wave-0a695f710.azurestaticapps.net/remoteEntry.js',
      remoteName: 'react',
      exposedModule: './web-components',
      elementName: 'react-element',
    } as WebComponentWrapperOptions,
  }

I tried with but didnt worked routes as

{
    path: 'LVE-ANiampleProjact',
    component: WebComponentWrapper,
    data: {
      type: 'module',
      remoteEntry: 'http://192.168.2.104:4202/remoteEntry.js',
      exposedModule: './web-components',
    }  as WebComponentWrapperOptions,
  }, {
    path: 'CloudExampleproject',
    component: WebComponentWrapper,
    data: {
      type: 'module',
      remoteEntry: 'https://carlosbayarri.github.io/ng-mfe-example/remoteEntry.js',
      exposedModule: './Mfe1Module',
    } as WebComponentWrapperOptions,
  }