-
Notifications
You must be signed in to change notification settings - Fork 819
Module Federation Support for Stencil JS #4693
-
We have a situation where team A is building Navigation component which needs to be integrated in Header component handled by team B, so we have lot of conflicts on release timelines and integration testing. To avoid this, we tried to take a micro service route for each component but chunks generated by them are having duplicate npm packages which has impact on our performance. So we were trying to consider micro frontend route and noticed that rollup can not acts as remote but only as host to consume remote. One option that we could consider is exporting navbar component as react output target and expose as remote via webpack for header team to consume but am having issues with consuming it in stencil component as well, is there better work around for. this ?
Did below changes in stencil config to consume remote entry,
plugins: [
federation({
remotes: {
remote_app_mfe: 'remote_app_mfe@http://localhost:3002/remoteEntry.js',
},
}),
],
rollupPlugins: {
before: [
// Plugins injected before rollupNodeResolve()
federation({
remotes: {
remote_app_mfe: 'remote_app_mfe@http://localhost:3002/remoteEntry.js',
},
}),
//resolvePlugin()
],
Beta Was this translation helpful? Give feedback.