When adding app-shell via ng generate app-shell, the generated target is
"app-shell": {
"builder": "@angular-devkit/build-angular:app-shell",
"options": {
"browserTarget": "latest-project:build",
"serverTarget": "latest-project:server",
"route": "shell"
}
}
Since browserTarget is latest-project:build, the production build will never be used when running the app-shell target and thus bundles sizes will be very big.
We should either use "browserTarget": "latest-project:build:production", or add a production configuration for the app shell target too.
"app-shell": {
"builder": "@angular-devkit/build-angular:app-shell",
"options": {
"browserTarget": "latest-project:build",
"serverTarget": "latest-project:server",
"route": "shell"
},
"configurations": {
"production": {
"browserTarget": "latest-project:build:production"
}
}
}
When adding app-shell via
ng generate app-shell, the generated target isSince
browserTargetislatest-project:build, the production build will never be used when running the app-shell target and thus bundles sizes will be very big.We should either use
"browserTarget": "latest-project:build:production",or add a production configuration for the app shell target too.