Open angelo-v opened 2 months ago
I solved it by bot setting "index": false
for the esbuild production build and also skipHtmlTransform
for the native-federation build:
"build": {
"executor": "@angular-architects/native-federation:build",
"options": {},
"configurations": {
"production": {
+ "skipHtmlTransform": true,
[...]
"esbuild": {
"executor": "@angular-devkit/build-angular:application",
"configurations": {
"production": {
+ "index": false,
(excerpt from nx project.json
)
I will leave the issue open, as a task to add this to the documentation or perhaps even as a new default setting for micro-frontends?
Since the integration happens in the shell, we do not want to expose micro-frontends as stand-alone apps in production. Yet an index.html file is included in the bundle of each frontend. Is there a way to prevent that?
I could remove the index.html from the angular build, but this leads to an error in
updateIndexHtml
of native-federation: