I have several Angular applications, each of which is included in a shell as a microfrontend. This is described in the Angular Architects Blog. The integration of the individual microfrontends into the shell works without any problems. For example, Microfrontend A is included under the path /microfrontend-a/
and Microfrontend B under the path /microfrontend-b/
.
Now these individual microfrontends use e.g. PrimeNG. Unfortunately, however, fonts from PrimeNG, for example, are not loaded with the correct path (/microfrontend-a/
), but under the root path. All images would also be loaded under the root path, if I would not manually specify the respective path of the microfrontend in the HTML template.
How can this be fixed so that the resources are loaded under the correct path?
baseHref does not work unfortunately, because the microfrontends are not included with their html file, but via remoteEntry.js
.