From 751e80b63e0cef5e0c409f47c0387ee0a7633eeb Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Thu, 7 Apr 2022 15:45:33 +0100 Subject: [PATCH] docs(angular): update mfe guide (#9500) * Revert "Revert "docs(angular): update the mfe guide (#9478)" (#9492)" This reverts commit 1903f018c952f7c46c362f2e63a16e11c46aa279. * docs(angular): fix guide to use mfe.config.js --- docs/shared/guides/setup-mfe-with-angular.md | 136 +++++++------------ 1 file changed, 48 insertions(+), 88 deletions(-) diff --git a/docs/shared/guides/setup-mfe-with-angular.md b/docs/shared/guides/setup-mfe-with-angular.md index 61d5eb1edb8ec..f6a5e04cfa31a 100644 --- a/docs/shared/guides/setup-mfe-with-angular.md +++ b/docs/shared/guides/setup-mfe-with-angular.md @@ -3,13 +3,13 @@ [Webpack 5](https://webpack.js.org/blog/2020-10-10-webpack-5-release/) introduced a [Module Federation Plugin](https://webpack.js.org/concepts/module-federation/#modulefederationplugin-high-level) enabling multiple, independently built and deployed bundles of code to form a single application. This is the foundation of Micro Frontend Architecture and the Module Federation Plugin makes implementing such an architecture much simpler. With Angular 12 adding support for Webpack 5 it increases the viability of scaffolding a Micro Frontend architecture with Angular. -We made some changes to our `@nrwl/angular:app` generator to aid in the scaffolding of Module Federation configuration required for setting up a Micro Frontend Architecture. +We have added some generators to aid in the scaffolding of the Module Federation configuration required for setting up a Micro Frontend Architecture. -Therefore, using Nx it can be fairly straightforward to scaffold and build a Micro Frontend Architecture from a monorepo with all the additional benefits of Nx. +Therefore, using Nx, it can be fairly straightforward to scaffold and build a Micro Frontend Architecture from a monorepo with all the additional benefits of Nx. -In this guide, we'll show you to how setup a Micro Frontend Architecture with Nx and Angular. +In this guide, we'll show you to how to set up a Micro Frontend Architecture with Nx and Angular. -> **NOTE**: When serving Micro-Frontends (_MFEs_) in dev mode locally, there'll be an error output to the console, `import.meta` cannot be used outside of a module, and the script that is coming from is `styles.js`. It's a known error output, but it doesn't actually cause any breakages from as far as our testing has shown. It's because the Angular compiler attaches the `styles.js` file to the `index.html` in a `