subpath bugfixes
This commit is contained in:
1 parent
076efc2101
commit
135a1aebb6
2 files changed
+45
-25
No files matched your search
+1
-1
@@ -18,7 +18,6 @@
|
||||
// In dev src/index.ts injects an empty list + "dev"; in production
|
||||
// scripts/build.ts injects the hashed dist asset list + a content hash.
|
||||
const PRECACHE: string[] = JSON.parse("__PRECACHE_MANIFEST__") as string[];
|
||||
const PRECACHE_URLS = PRECACHE.map(path => new URL(path, sw.location.href).pathname);
|
||||
const VERSION = "__CACHE_VERSION__";
|
||||
|
||||
const SHELL_CACHE = `whisper-shell-${VERSION}`;
|
||||
@@ -44,6 +43,7 @@ interface ServiceWorkerScope {
|
||||
addEventListener(type: "message", listener: (event: MessageEvent<unknown>) => void): void;
|
||||
}
|
||||
const sw = self as unknown as ServiceWorkerScope;
|
||||
const PRECACHE_URLS = PRECACHE.map(path => new URL(path, sw.location.href).pathname);
|
||||
|
||||
sw.addEventListener("install", (event) => {
|
||||
event.waitUntil(
|
||||
|
||||
Reference in new issue
Block a user