Using Angular 8 and when I register a service worker under domain/web/v/lib, it does not caches or fetches domain/web/v/lib/resources/test.js.
At first it seemed like a scope issue, but then I registered the service worker under domain/ngsw-worker.json and although the requests are going through the service worker, it still does not cache anything. The cache is always empty and resources get requested from the server not form cache.
ngsw.json looks like this:
{
"index": "/index.html",
"assetGroups": [
{
"name": "resources",
"installMode": "lazy",
"updateMode": "lazy",
"urls"[
"/web/v/lib/resources/test.js",],
"patterns": []
}
],
"dataGroups": [],
"hashTable": {
"/web/v/lib/resources/test.js": "699fb3320f0d0761a4f7e3c469a2a42598b74772"}
,}
I assume I miss something obvious but cannot figure out what :/
EDIT: figured out that it only works if I serve the service worker on the base href path, for some reason whenever I move it somewhere else, it does not work :O