You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for the great idea of Module Federation as well as this demo!
I've run this demo and it is cool, however I have some feeling of tight coupling between those concerned web apps, for instance, app-01 public/index.html has to reference to these two dynamically generated remote-entry by WebPack based on options to ModuleFederationPlugin defined in the other two Remotes respectively, which has added hard-coded dependency between app-01 and app-02, app-03. If any of app-02, app-03 makes change on filename in options to ModuleFederationPlugin, MF in app-01 will break down unless app-01 is changed accordingly and deployed again.
I am wondering if ModuleFederationPlugin could dynamically insert these two concerned <script> tags under <head> in the template public/index.html during execution of Webpacking since HtmlWebpackPlugin comes after ModuleFederationPlugin
Alternatively how about to have a module discovery/registry as a service discovery does on backend, i.e Consul Each Remote will automatically register itself while starting up and A Host can fetch details of A Remote from the module discovery. In this way, A Host is a bit more loosely coupled with A Remote.
Hopefully my thoughts will make sense for you :)
The text was updated successfully, but these errors were encountered:
thanks for the great idea of Module Federation as well as this demo!
I've run this demo and it is cool, however I have some feeling of tight coupling between those concerned web apps, for instance, app-01 public/index.html has to reference to these two dynamically generated remote-entry by WebPack based on options to
ModuleFederationPlugin
defined in the other two Remotes respectively, which has added hard-coded dependency between app-01 and app-02, app-03. If any of app-02, app-03 makes change on filename in options toModuleFederationPlugin
, MF in app-01 will break down unless app-01 is changed accordingly and deployed again.I am wondering if ModuleFederationPlugin could dynamically insert these two concerned
<script>
tags under<head>
in the template public/index.html during execution of Webpacking since HtmlWebpackPlugin comes after ModuleFederationPluginAlternatively how about to have a module discovery/registry as a service discovery does on backend, i.e Consul Each Remote will automatically register itself while starting up and A Host can fetch details of A Remote from the module discovery. In this way, A Host is a bit more loosely coupled with A Remote.
Hopefully my thoughts will make sense for you :)
The text was updated successfully, but these errors were encountered: