Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit f039239

Browse files
committed
Minor fix 🚀
1 parent 256c198 commit f039239

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/posts/2022-06-06-microfrontend-module-federation-dynamic-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Now, if you look closely to the configuration above you noticed something strang
311311
* the url of the remote entry file is defined as `'cancelOrderWidget@[widgets.cancellationOrderWidgetUrl]
312312
/remoteEntry.js'`, so it expects to find it in some way defined in the `[widgets.cancellationOrderWidgetUrl]`
313313
placeholder.
314-
* we are calling an additional plugin from the module federartion world called `ExternalTemplateRemotesPlugin`.
314+
* we are calling an additional plugin from the module federation world called `ExternalTemplateRemotesPlugin`.
315315

316316
This combination in the configuration will let us define the url of the remote entry file dinamically at runtime when the application starts :heart_eyes:. This is a consequence of the fact that what we defined as `[widgets.cancellationOrderWidgetUrl]/remoteEntry.js'` will be replaced by the `ExternalTemplateRemotesPlugin` as `widgets.cancellationOrderWidgetUrl + "/remoteEntry.js"`, so a concatenation of a variable, `widgets.cancellationOrderWidgetUrl` that as you can see is defined on the `window` object, plus the fixed part of the url `"/remoteEntry.js"` ([here](https://github.com/module-federation/external-remotes-plugin/blob/main/index.js "ExternalTemplateRemotesPlugin") you can find the source code for the `ExternalTemplateRemotesPlugin` that contains the concatenation described here).
317317
This is absolutely astonishing!! :rocket: This basically means we can have multiple federated module remote entry file urls configurations based on different needs, for example different urls for enviroment (eg. local, qa, production). This also means that we can dinamically update these url and let the `my-area` app configure itself at runtime with a list of urls that represents the latest versions of our federated remote modules :heart_eyes:.

0 commit comments

Comments
 (0)