Skip to content

Instantly share code, notes, and snippets.

@webmaxru
Last active October 2, 2017 14:24
Show Gist options
  • Save webmaxru/e359b61d60fdb23013dbe9ec6acbf0c7 to your computer and use it in GitHub Desktop.
Save webmaxru/e359b61d60fdb23013dbe9ec6acbf0c7 to your computer and use it in GitHub Desktop.
ngsw - configuration file
{
"index": "/index.html",
"appData": {
"test": true
},
"assetGroups": [{
"name": "appshell",
"resources": {
"files": [
"/assets/**/*",
"!/ngsw-worker.js"
],
"versionedFiles": [
"/**/*.html",
"/**/*.js",
"/**/*.css"
],
"urls": [
"https://fonts.googleapis.com/css?family=Material+Icons",
"https://fonts.gstatic.com/s/materialicons/v29/2fcrYFNaTjcS6g4U3t-Y5UEw0lE80llgEseQY3FEmqw.woff2"
]
}
}],
"dataGroups": [{
"name": "api-freshness",
"urls": [
"/timeline"
],
"cacheConfig": {
"maxSize": 100,
"maxAge": "3d",
"timeout": "1m",
"strategy": "freshness"
}
},
{
"name": "api-performance",
"urls": [
"/favorites"
],
"cacheConfig": {
"maxSize": 100,
"maxAge": "3d",
"timeout": "1m",
"strategy": "performance"
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment