How to extract the Component from module federation remote module
At present I am having the below code
Remote code:
exposes: {
'./TodoModule': './src/todo/todo.module.ts',
'./TodoComponent': './src/todo/todo.component.ts'
},
Shell Code:
const {TodoComponent} = await loadRemoteModule({
type: 'module',
remoteEntry: 'http://localhost:4300/remoteEntry.js',
exposedModule: './TodoComponent',
});
this.ref.createComponent(TodoComponent);
So its working as expected.
Now I want to do the same without exposing the component
Remote Code:
exposes: { './TodoModule': './src/todo/todo.module.ts' },
Shell Code:
const {TodoModule} = await loadRemoteModule({
type: 'module',
remoteEntry: 'http://localhost:4300/remoteEntry.js',
exposedModule: './TodoModule',
});
I need to extract a particular component from it and add it in the below code
this.ref.createComponent(TodoComponent);
Do we have any way to extract the Component from the above Module?