Working on an offline angular with service workers get the reference from https://angular.io/guide/service-worker-config
Application working fine offline the only issue is with cache update mechanism if i use "installMode": "prefetch"
application works fine offline but files in cache never update on updation of the files on server . If i use "installMode": "lazy"` app does not work offline.
below is the ngsw-config.json
of my application.
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js",
"/*.manifest",
"/assets/**"
]
}
}
]
}
also tried updateMode
but still cache files not update on changes
"installMode": "prefetch",
"updateMode": "prefetch",