{"id":3975,"date":"2020-04-22T22:24:51","date_gmt":"2020-04-22T20:24:51","guid":{"rendered":"https:\/\/www.angulararchitects.io\/?p=3975"},"modified":"2020-04-22T22:24:51","modified_gmt":"2020-04-22T20:24:51","slug":"the-microfrontend-revolution-module-federation-in-webpack-5","status":"publish","type":"post","link":"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/","title":{"rendered":"The Microfrontend Revolution: Module Federation in Webpack 5"},"content":{"rendered":"<div class=\"wp-post-series-box series-module-federation wp-post-series-box--expandable\">\n\t\t\t<input id=\"collapsible-series-module-federation69eb4a2b491ad\" class=\"wp-post-series-box__toggle_checkbox\" type=\"checkbox\">\n\t\n\t<label\n\t\tclass=\"wp-post-series-box__label\"\n\t\t\t\t\tfor=\"collapsible-series-module-federation69eb4a2b491ad\"\n\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\t\t<p class=\"wp-post-series-box__name wp-post-series-name\">\n\t\t\tThis is post 1 of 10 in the series <em>&ldquo;Module Federation&rdquo;<\/em>\t\t<\/p>\n\t\t\t<\/label>\n\n\t\t\t<div class=\"wp-post-series-box__posts\">\n\t\t\t<ol>\n\t\t\t\t\t\t\t\t\t<li><span class=\"wp-post-series-box__current\">The Microfrontend Revolution: Module Federation in Webpack 5<\/span><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-part-2-module-federation-with-angular\/\">The Microfrontend Revolution: Module Federation with Angular<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/dynamic-module-federation-with-angular\/\">Dynamic Module Federation with Angular<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/dynamic-module-federation-with-angular-2\/\">Building A Plugin-based Workflow Designer With Angular and Module Federation<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/getting-out-of-version-mismatch-hell-with-module-federation\/\">Getting Out of Version-Mismatch-Hell with Module Federation<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/using-module-federation-with-monorepos-and-angular\/\">Using Module Federation with (Nx) Monorepos and Angular<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/pitfalls-with-module-federation-and-angular\/\">Pitfalls with Module Federation and Angular<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/multi-framework-and-version-micro-frontends-with-module-federation-your-4-steps-guide\/\">Multi-Framework and -Version Micro Frontends with Module Federation: Your 4 Steps Guide<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/module-federation-with-angulars-standalone-components\/\">Module Federation with Angular&#8217;s Standalone Components<\/a><\/li>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https:\/\/www.angulararchitects.io\/en\/blog\/whats-new-in-angular-architects-module-federation-14-3\/\">What&#8217;s New in our Module Federation Plugin 14.3?<\/a><\/li>\n\t\t\t\t\t\t\t<\/ol>\n\t\t<\/div>\n\t<\/div>\n<blockquote><p>\n 2020-10-13: Updated to use webpack 5<br \/>\n <strong>Important:<\/strong> This first part of the article series shows Module Federation with a simple &quot;TypeScript-only example&quot;. If you look for an example also using <strong>Angular<\/strong>, please <a href=\"\/aktuelles\/the-microfrontend-revolution-part-2-module-federation-with-angular\/\">directly jump to the 2nd part of this series<\/a>.\n <\/p><\/blockquote>\n<p>The Module Federation integrated in Webpack beginning with version 5 allows the loading of separately compiled program parts. Hence, it finally provides an official solution for the implementation of microfrontends.<br \/>\nUntil now, when implementing microfrontends, you had to dig a little into the bag of tricks. One reason is surely that current build tools and frameworks do not know this concept. Module Federation initiates a change of course here.<br \/>\nIt allows an approach called <a href=\"https:\/\/medium.com\/@ScriptedAlchemy\/webpack-5-module-federation-a-game-changer-to-javascript-architecture-bcdd30e02669\">Module Federation<\/a> for referencing program parts that are not yet known at compile time. These can be self-compiled microfrontends. In addition, the individual program parts can share libraries with each other, so that the individual bundles do not contain any duplicates.<br \/>\nIn this article, I will show how to use Module Federation using a simple example. The <a href=\"https:\/\/github.com\/manfredsteyer\/federation-demo.git\">source code<\/a> can be found <a href=\"https:\/\/github.com\/manfredsteyer\/federation-demo.git\">here<\/a>.<\/p>\n<h2>Example<\/h2>\n<p>The example used here consists of a shell, which is able to load individual, separately provided microfrontends if required:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/04\/example.png\" alt=\"Shell with microfrontend\" \/><\/p>\n<p>The shell is represented here by the black navigation bar. The micro front end through the framed area shown below. Also, the microfrontend can also be started without a shell<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/04\/standalone.png\" alt=\"Microfrontends in standalone mode\" \/><\/p>\n<p>This is necessary to enable separate development and testing. It can also be advantageous for weaker clients, such as mobile devices, to only have to load the required program part.<\/p>\n<h2>Concepts of Module Federation<\/h2>\n<p>In the past, the implementation of scenarios like the one shown here was difficult, especially since tools like <strong>Webpack assume<\/strong> that the <strong>entire program code is available when compiling<\/strong>. Lazy loading is possible, but only from areas that were split off during compilation.<br \/>\nWith microfrontend architectures, in particular, one would like to compile and provide the individual program parts separately. In addition, mutual referencing via the respective URL is necessary. Hence, constructs like this would be desirable:<\/p>\n<pre><code class=\"language-typescript\">import(&#039;http:\/\/other-microfrontend&#039;);<\/code><\/pre>\n<p>Since this is not possible for the reasons mentioned, one had to resort to approaches such as <a href=\"https:\/\/www.angulararchitects.io\/aktuelles\/6-steps-to-your-angular-based-microfrontend-shell\/\">externals<\/a> and manual script loading. Fortunately, this will change with the Federation module in Webpack 5.<br \/>\nThe idea behind it is simple: A so-called host references a <strong>remote<\/strong> using a configured name. What this name refers to is <strong>not known at compile time<\/strong>:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/04\/hub-and-spoke.png\" alt=\"The host accesses the remote using a configured name\" \/><\/p>\n<p>This reference is only <strong>resolved at runtime by loading a so-called remote entry point<\/strong>. It is a <strong>minimal script<\/strong> that provides the actual external url for such a configured name.<\/p>\n<h2>Implementation of the Host<\/h2>\n<p>The <strong>host<\/strong> is a JavaScript application that <strong>loads a remote when needed<\/strong>. A dynamic import is used for this.<br \/>\nThe following host loads the component <code>mfe1\/component<\/code> in this way -- <code>mfe1<\/code> is the name of a configured remote and <code>component<\/code> the name of a file (an EcmaScript module) it provides.<\/p>\n<pre><code class=\"language-typescript\">const rxjs = await import(&#039;rxjs&#039;);\n\n const container = document.getElementById(&#039;container&#039;);\n const flightsLink = document.getElementById(&#039;flights&#039;);\n\n rxjs.fromEvent(flightsLink, &#039;click&#039;).subscribe(async _ =&gt; {\n     const module = await import(&#039;mfe1\/component&#039;);\n     const elm = document.createElement(module.elementName);\n     [\u2026]    \n     container.appendChild(elm);\n });<\/code><\/pre>\n<p>Webpack would normally take this reference into account when compiling and split off a separate bundle for it. To prevent this, the <code>ModuleFederationPlugin<\/code> is used:<\/p>\n<pre><code class=\"language-typescript\">const ModuleFederationPlugin = require(&quot;webpack\/lib\/container\/ModuleFederationPlugin&quot;);\n\n [\u2026]\n  output: {\n       publicPath: &quot;http:\/\/localhost:5000\/&quot;,\n       uniqueName: &#039;shell&#039;,\n       [\u2026]\n  },\n plugins: [\n   new ModuleFederationPlugin({\n     name: &quot;shell&quot;,\n     library: { type: &quot;var&quot;, name: &quot;shell&quot; },\n     remoteType: &quot;var&quot;,\n     remotes: {\n       mfe1: &quot;mfe1&quot;\n     },\n     shared: [&quot;rxjs&quot;]\n   })\n ]<\/code><\/pre>\n<p>With its help, the remote <code>mfe1<\/code> (Microfrontend 1) is defined. The configuration shown here maps the internal application name <code>mfe1<\/code> to the same official name. Webpack <strong>does not include<\/strong> any <code>import<\/code> that now relates to <code>mfe1<\/code> in the bundles generated <strong>at compile time<\/strong>.<br \/>\nLibraries that the host should share with the remotes are mentioned in the <code>shared<\/code> array. In the case shown, this is <code>rxjs<\/code>. This means that the entire application only needs to load this library once. Without this specification, <code>rxjs<\/code> would end up in the bundles of the host as well as those of all remotes.<br \/>\nFor this to work without problems, the host and remote must agree on a common version.<br \/>\nIn addition to the settings for the <code>ModuleFederationPlugin<\/code>, we also need to place some options in the <code>output<\/code> section. The <code>publicPath<\/code> defines the URL under which the application can later be found. This reveals where the individual bundles of the application but also their assets, e.g. pictures or styles, can be found.<br \/>\nThe <code>uniqueName<\/code> is used to represents the host or remote in the generated bundles. By default, webpack uses the name from <code>package.json<\/code> for this. In order to avoid name conflicts when using Monorepos with several applications, it is recommended to set the uniqueName manually.<\/p>\n<h2>Loading Shared Libraries<\/h2>\n<p>For loading shared libraries, we must use <strong>dynamic imports<\/strong>:<\/p>\n<pre><code class=\"language-typescript\">const rxjs = await import(&#039;rxjs&#039;);<\/code><\/pre>\n<p>They are asynchronous and this gives webpack the time necessary to decide upon which version to use and to load it. This is especially important in cases where different remotes and hosts use different versions of the same library. In general, webpack tries to load the highest compatible version. More about negotiating versions and dealing with version mismatches this can be found in a later article of this series.<br \/>\nTo bypass this issue, it's a good idea to load the whole application with dynamic imports in the entry point used. For instance, the Micro Frontend could use a <code><code>main.ts<\/code><\/code> which looks like this:<\/p>\n<pre><code class=\"language-typescript\">import(&#039;.\/component&#039;);<\/code><\/pre>\n<p>This gives webpack the time needed for the negotiation and loading the shared libraries when the application starts. Hence, in the rest of the application one can always use static (&quot;traditional&quot;) imports like<\/p>\n<pre><code class=\"language-typescript\">import * as rxjs from &#039;rxjs&#039;;<\/code><\/pre>\n<h2>Implementation of the Remote<\/h2>\n<p>The remote is also a standalone application. In the case considered here, it is based on Web Components:<\/p>\n<pre><code class=\"language-typescript\">class Microfrontend1 extends HTMLElement {\n\n     constructor() {\n         super();\n         this.attachShadow({ mode: &#039;open&#039; });\n     }\n\n     async connectedCallback() {\n         this.shadowRoot.innerHTML = <code>[\u2026]<\/code>;\n     }\n }\n\n const elementName = &#039;microfrontend-one&#039;;\n customElements.define(elementName, Microfrontend1);\n\n export { elementName };<\/code><\/pre>\n<p>Instead of web components, any JavaScript constructs or components based on frameworks can also be used. In this case, the frameworks can be shared between the remotes and the host as shown.<br \/>\nThe webpack configuration of the remote, which also uses the ` ModuleFederationPlugin '', exports this component with the property exposes under the name component:<\/p>\n<pre><code class=\"language-javascript\"> output: {\n       publicPath: &quot;http:\/\/localhost:3000\/&quot;,\n       uniqueName: &#039;mfe1&#039;,\n       [\u2026]\n  },\n  [\u2026]\n  plugins: [\n     new ModuleFederationPlugin({\n       name: &quot;mfe1&quot;,\n       library: { type: &quot;var&quot;, name: &quot;mfe1&quot; },\n       filename: &quot;remoteEntry.js&quot;,\n       exposes: {\n         &#039;.\/component&#039;: &quot;.\/mfe1\/component&quot;\n       },\n       shared: [&quot;rxjs&quot;]\n     })\n ]    <\/code><\/pre>\n<p>The name component refers to the corresponding file. In addition, this configuration defines the name <code>mfe1<\/code> for the remote. To access the remote, the host uses a path that consists of the two configured names, <code>mfe1<\/code> and <code>component<\/code>. This results in the instruction shown above: <\/p>\n<pre><code class=\"language-typescript\">import(&#039;mfe1\/component&#039;)<\/code><\/pre>\n<p>However, the host must know the URL at which it finds <code>mfe1<\/code>. The next section shows how this can be accomplished.<\/p>\n<h2>Connect Host to Remote<\/h2>\n<p>To give the host the option to resolve the name <code>mfe1<\/code>, the host must load a remote entry point. This is a script that the <code>ModuleFederationPlugin<\/code> generates when the remote is compiled.<br \/>\nThe name of this script can be found in the <code>filename<\/code> property shown in the previous section. The url of the microfrontend is taken from the <code>publicPath<\/code> property. This means that the url of the remote must already be known when it is compiled. Fortunately, there is already a PR which removed this need.<br \/>\nNow this script is only to be integrated into the host:<\/p>\n<pre><code class=\"language-html\">&lt;script src=&quot;http:\/\/localhost:3000\/remoteEntry.js&quot;&gt;&lt;\/script&gt;<\/code><\/pre>\n<p>At runtime it can now be observed that the instruction<\/p>\n<pre><code class=\"language-typescript\">import(&#039;mfe1\/component&#039;);<\/code><\/pre>\n<p>causes the host to load the remote from its own url (which is <code>localhost:3000<\/code> in our case):<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/04\/runtime.png\" alt=\"Laden des Remotes von anderer Url\" \/><\/p>\n<h2>Conclusion and Outlook<\/h2>\n<p>The Module Federation integrated in Webpack beginning with version 5 <strong>fills a large gap<\/strong> for microfrentends. Finally, separately compiled and provided program parts can be reloaded and already loaded libraries can be reused.<br \/>\nHowever, the teams involved in developing such applications must manually ensure that the individual parts interact. This also means that you have to define and comply with contracts between the individual microfrontends, but also that you have to agree on a version for each of the shared libraries.<\/p>\n<h2>What's next? More on Architecture!<\/h2>\n<p>So far, we've seen that Module Federation is a strightforward solution for creating Micro Frontends on top of Angular. However, when dealing with it, several additional questions come in mind:<\/p>\n<ul>\n<li>According to which criteria can we sub-divide a huge application into micro frontends?<\/li>\n<li>Which access restrictions make sense?<\/li>\n<li>Which proven patterns should we use?<\/li>\n<li>How can we avoid pitfalls when working with Module Federation?<\/li>\n<li>Which advanced scenarios are possible?<\/li>\n<\/ul>\n<p>Our free eBook (about 100 pages) covers all these questions and more:<br \/>\n<a href=\"https:\/\/www.angulararchitects.io\/book\"><img decoding=\"async\" src=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/12\/cover-small.png\" alt=\"free ebook\"><\/a><br \/>\nFeel free to <a href=\"https:\/\/www.angulararchitects.io\/book\">download it here<\/a> now!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.<\/p>\n","protected":false},"author":9,"featured_media":3981,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3975","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unkategorisiert","post_series-module-federation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects<\/title>\n<meta name=\"description\" content=\"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.angulararchitects.io\/en\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects\" \/>\n<meta property=\"og:description\" content=\"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/\" \/>\n<meta property=\"og:site_name\" content=\"ANGULARarchitects\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-22T20:24:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/sujet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"955\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Manfred Steyer, GDE\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@daniel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manfred Steyer, GDE\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/\"},\"author\":{\"name\":\"Manfred Steyer, GDE\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\"},\"headline\":\"The Microfrontend Revolution: Module Federation in Webpack 5\",\"datePublished\":\"2020-04-22T20:24:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/\"},\"wordCount\":1297,\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg\",\"articleSection\":[\"Unkategorisiert\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/\",\"url\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/\",\"name\":\"The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects\",\"isPartOf\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg\",\"datePublished\":\"2020-04-22T20:24:51+00:00\",\"description\":\"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg\",\"width\":800,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.angulararchitects.io\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Microfrontend Revolution: Module Federation in Webpack 5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#website\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"name\":\"ANGULARarchitects\",\"description\":\"AngularArchitects.io\",\"publisher\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#organization\",\"name\":\"ANGULARarchitects\",\"alternateName\":\"SOFTWAREarchitects\",\"url\":\"https:\/\/www.angulararchitects.io\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"contentUrl\":\"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg\",\"width\":644,\"height\":216,\"caption\":\"ANGULARarchitects\"},\"image\":{\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/github.com\/angular-architects\",\"https:\/\/www.linkedin.com\/company\/angular-architects\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951\",\"name\":\"Manfred Steyer, GDE\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g\",\"caption\":\"Manfred Steyer, GDE\"},\"sameAs\":[\"https:\/\/x.com\/daniel\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects","description":"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.angulararchitects.io\/en\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/","og_locale":"en_US","og_type":"article","og_title":"The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects","og_description":"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.","og_url":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/","og_site_name":"ANGULARarchitects","article_published_time":"2020-04-22T20:24:51+00:00","og_image":[{"width":955,"height":500,"url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/sujet.png","type":"image\/png"}],"author":"Manfred Steyer, GDE","twitter_card":"summary_large_image","twitter_creator":"@daniel","twitter_misc":{"Written by":"Manfred Steyer, GDE","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#article","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/"},"author":{"name":"Manfred Steyer, GDE","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951"},"headline":"The Microfrontend Revolution: Module Federation in Webpack 5","datePublished":"2020-04-22T20:24:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/"},"wordCount":1297,"publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"image":{"@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg","articleSection":["Unkategorisiert"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.angulararchitects.io\/en\/blog\/the-microfrontend-revolution-module-federation-in-webpack-5\/","url":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/","name":"The Microfrontend Revolution: Module Federation in Webpack 5 - ANGULARarchitects","isPartOf":{"@id":"https:\/\/www.angulararchitects.io\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage"},"image":{"@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg","datePublished":"2020-04-22T20:24:51+00:00","description":"Module Federation allows loading separately compiled program parts. This makes it an official solution for implementing microfrontends.","breadcrumb":{"@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#primaryimage","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2020\/04\/star-trek-discovery-federation-flag-logo.jpg","width":800,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.angulararchitects.io\/aktuelles\/the-microfrontend-revolution-module-federation-in-webpack-5\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.angulararchitects.io\/en\/"},{"@type":"ListItem","position":2,"name":"The Microfrontend Revolution: Module Federation in Webpack 5"}]},{"@type":"WebSite","@id":"https:\/\/www.angulararchitects.io\/en\/#website","url":"https:\/\/www.angulararchitects.io\/en\/","name":"ANGULARarchitects","description":"AngularArchitects.io","publisher":{"@id":"https:\/\/www.angulararchitects.io\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.angulararchitects.io\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.angulararchitects.io\/en\/#organization","name":"ANGULARarchitects","alternateName":"SOFTWAREarchitects","url":"https:\/\/www.angulararchitects.io\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","contentUrl":"https:\/\/www.angulararchitects.io\/wp-content\/uploads\/2023\/07\/AA-Logo-RGB-horizontal-inside-knowledge-black.svg","width":644,"height":216,"caption":"ANGULARarchitects"},"image":{"@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/github.com\/angular-architects","https:\/\/www.linkedin.com\/company\/angular-architects\/"]},{"@type":"Person","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/15628efa7af4475ffaaeeb26c5112951","name":"Manfred Steyer, GDE","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.angulararchitects.io\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0b59539674d8b71ea1c1f4764b11244b5f499203f1d11b40f37d8f3f90be033?s=96&d=mm&r=g","caption":"Manfred Steyer, GDE"},"sameAs":["https:\/\/x.com\/daniel"]}]}},"_links":{"self":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/3975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/comments?post=3975"}],"version-history":[{"count":0,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/posts\/3975\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media\/3981"}],"wp:attachment":[{"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/media?parent=3975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/categories?post=3975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulararchitects.io\/en\/wp-json\/wp\/v2\/tags?post=3975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}