x)- [x] bug report
- [ ] feature request
- [x] devkit
- [x] schematics
Angular CLI: 6.0.8
Node: 8.11.2
OS: win32 x64
Angular: 6.0.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2
webpack 4.8.3
ng new app-shell-test --routingng g app-shell --universal-project=app-shell-test --client-project=app-shell-testng build or ng build --prodThe app shell is not generated.
I'm trying to add the app shell to my app, but ng build not want to generate it. The shell generates only after ng run app-shell-test:app-shell. Is this a valid behavior or a bug? (in the first case the --skip-app-shell is unused...)
This is the intended behavior, yes. It is documented in https://github.com/angular/angular-cli/wiki/stories-app-shell.
@filipesilva,
ng build--skip-app-shell and this option worked prior to 6.0, see https://github.com/angular/angular-cli/wiki/build BUT this option fully ignored now => shell will never be generated during ng buildng build--skip-app-shell still here?There isn't anything there about ng build because the way you build the app shell is via ng run my-app:app-shell. You'll find your built project in the dist directory, with the app shell inside index.html.
--skip-app-shell shouldn't be there anymore though. That option should error out. I'll reopen so someone can remove that option from the allowed list.
--skip-app-shell shouldn't be there anymore though.
Ok, thank you :)
So i'm confused, ng build doesn't generate the app shell and ng run my-app:app-shell doesn't generate the service worker. How do you build a pwa with an app shell?
Also running ng-run my-app:app-shell doesnt build optimised files. Basic vendorJS greater than 3mb.
@JimDrury you can use ng-run my-app:app-shell -c production if you generated the app-shell with the CLI to have a production build with app-shell enabled. This also works together with Angular Universal+Angular Service Worker, something I also initially struggled with.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@JimDrury you can use
ng-run my-app:app-shell -c productionif you generated the app-shell with the CLI to have a production build with app-shell enabled. This also works together with Angular Universal+Angular Service Worker, something I also initially struggled with.