A bug in Nx's Webpack Module Federation support for Angular causes remote entry components to render twice when served as standalone apps, but only when the remote uses Angular Standalone Components and includes a router-outlet in its template. The root cause is that the entry component gets both declared in index.html and routed via entry.routes, resulting in duplicate rendering. The proposed fix separates the concerns of app.routes and entry.routes: app.routes becomes the real route provider for standalone serving, while entry.routes acts as a shell-only plugin that imports app.routes as children. A GitHub issue and PR were filed against the Nx repository.

8m read timeFrom playfulprogramming.com
Post cover image
Table of contents
The issue Copy link Link copied!The reason Copy link Link copied!My solution Copy link Link copied!Conclusions Copy link Link copied!

Sort: