Last active
November 16, 2017 09:56
-
-
Save SergeyMell/d50a68905dc4a60146c3975d98d3e093 to your computer and use it in GitHub Desktop.
Configuration file for Service Worker in Angular applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"index": "/index.html", | |
"appData": { | |
"name": "Angular Service Worker Example", | |
"description": "Example of Angular v5 application utilizing SW functionality" | |
}, | |
"assetGroups": [ | |
{ | |
"name": "app", | |
"installMode": "prefetch", | |
"resources": { | |
"files": [ | |
"/favicon.ico", | |
"/index.html" | |
], | |
"versionedFiles": [ | |
"/*.bundle.css", | |
"/*.bundle.js", | |
"/*.chunk.js" | |
] | |
} | |
}, | |
{ | |
"name": "assets", | |
"installMode": "lazy", | |
"updateMode": "prefetch", | |
"resources": { | |
"files": [ | |
"/assets/**" | |
] | |
} | |
}, | |
{ | |
"name": "fonts", | |
"resources": { | |
"urls": [ | |
"https://fonts.googleapis.com/**" | |
] | |
} | |
} | |
], | |
"dataGroups": [ | |
{ | |
"name": "api", | |
"urls": [ | |
"/api/**" | |
], | |
"cacheConfig": { | |
"strategy": "freshness", | |
"maxSize": 100, | |
"maxAge": "3d", | |
"timeout": "10s" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment