socialnetworknews-web

A open-source Paper.li clone
git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-web.git
Log | Files | Refs | README | LICENSE

commit 1f3c2d424b1576707c50ec7775a7eb77a2bf2108
parent d99abc8cca544634f5eb8e66e1a05cd073090fdf
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 19 Feb 2018 15:38:39 +0100

Update Service Worker config

Diffstat:
Msrc/ngsw-config.json | 47+++++++++++++++++++++++++++++++++++------------
1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/ngsw-config.json b/src/ngsw-config.json @@ -1,25 +1,48 @@ { "index": "/index.html", - "appData": { - "test": true - }, "assetGroups": [{ - "name": "appshell", + "name": "app", + "installMode": "prefetch", "resources": { "files": [ - "/assets/**/*", - "!/ngsw-worker.js" + "/favicon.ico", + "/index.html" ], "versionedFiles": [ - "/**/*.html", - "/**/*.js", - "/**/*.css" - ], - "urls": [ + "/*.bundle.css", + "/*.bundle.js", + "/*.chunk.js" + ] + } + }, { + "name": "lazy-assets", + "installMode": "lazy", + "resources": { + "files": [ + "/assets/**/*" + ] + } + }, { + "name": "static-assets", + "installMode": "lazy", + "updateMode": "prefetch", + "resources": { + "urls": [ "https://fonts.googleapis.com/css?family=Material+Icons", "https://fonts.gstatic.com/s/materialicons/v29/2fcrYFNaTjcS6g4U3t-Y5UEw0lE80llgEseQY3FEmqw.woff2" ] } }], - "dataGroups": [] + "dataGroups": [{ + "name": "api", + "urls": [ + "/api/papers" + ], + "cacheConfig": { + "maxSize": 100, + "maxAge": "1d", + "timeout": "3m", + "strategy": "freshness" + } + }] }