Skip to content

Commit

Permalink
docs(angular): fix guide formatting (nrwl#9603)
Browse files Browse the repository at this point in the history
* docs(angular): fix guide formatting

* docs(angular): fix formatting

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
  • Loading branch information
2 people authored and sidmonta committed Apr 2, 2022
1 parent a50ab98 commit 217e4df
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/shared/guides/setup-mfe-with-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ Therefore, using Nx it can be fairly straightforward to scaffold and build a Mic

In this guide, we'll show you to how setup 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 `<script>` tag with `defer`.
It needs to be attached with `type=module`, but doing so breaks HMR. There is no way of hooking into that process for us to patch it ourselves.
The good news is that the error doesn't propagate to production, because styles are compiled to a CSS file, so there's no erroneous JS to log an error.
It's worth reiterating that there's been no actual errors or breakages noted from our tests.\_
> **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 `<script>` tag with `defer`.
>
> It needs to be attached with `type=module`, but doing so breaks HMR. There is no way of hooking into that process for us to patch it ourselves.
>
> The good news is that the error doesn't propagate to production, because styles are compiled to a CSS file, so there's no erroneous JS to log an error.
>
> It's worth reiterating that there's been no actual errors or breakages noted from our tests.
## What we'll build

Expand Down

0 comments on commit 217e4df

Please sign in to comment.