refactor(service-worker): move asset URL normalization to Adapter (#37922)

This is in preparation of enabling the ServiceWorker to handle
relative paths in `ngsw.json` (as discussed in #25055), which will
require normalizing URLs in other parts of the ServiceWorker.

PR Close #37922
This commit is contained in:
George Kalpakas
2020-07-06 16:55:36 +03:00
committed by atscott
parent 2156beed0c
commit d380e93b82
4 changed files with 54 additions and 41 deletions

View File

@ -12,5 +12,5 @@ import {Driver} from './src/driver';
const scope = self as any as ServiceWorkerGlobalScope;
const adapter = new Adapter(scope);
const adapter = new Adapter(scope.registration.scope);
const driver = new Driver(scope, adapter, new CacheDatabase(scope, adapter));