Instantly share code, notes, and snippets.

Embed
What would you like to do?
ngsw-config.json
{
"index": "/index.html",
"dataGroups": [{
"name": "api-performance",
"urls": [
"/assets/i18n/**",
"/api/**"
],
"cacheConfig": {
"strategy": "performance",
"maxSize": 100,
"maxAge": "3d"
}
},
{
"name": "api-freshness",
"urls": [
"/api/fresh-todo-list"
],
"cacheConfig": {
"strategy": "freshness",
"maxSize": 100,
"maxAge": "3d",
"timeout": "10s"
}
}
],
"assetGroups": [{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
]
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment