Closed
Description
Bug Report
Affected Package
The issue is caused by package @angular/...."@angular/service-worker"
: "^12.0.0"
Is this a regression?
- (Haven't tried with ealier version)
Description
- Follow instruction in Angular official tutorial about PWA
- Host application using
http-server
(mentioned in the above tutorial) - Set chrome to ONLINE and load the page
- Set chrome to OFFLINE and press F5 to reload the loaded page
Minimal Reproduction
Exception or Error
Your Environment
Angular Version:
Angular CLI: 12.0.0
Node: 14.17.0
Package Manager: npm 6.14.9
OS: win32 x64
Angular: 12.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker, upgrade
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.0
@angular-devkit/build-angular 12.0.0
@angular-devkit/core 12.0.0
@angular-devkit/schematics 12.0.0
@schematics/angular 12.0.0
rxjs 6.6.7
typescript 4.2.4
Anything else relevant?
What I notice is:
- In the generated
ngsw.json
, theurls
in bothapp
andassets
section insideassetGroups
are all blank (see the below image)
- When I filled values into
urls
as the below image, the PWA worked perfectly. App can work in Offline mode