Service worker not over HTTP
This commit is contained in:
@@ -2,11 +2,11 @@ import { manifest, version } from "@parcel/service-worker";
|
||||
|
||||
async function install() {
|
||||
const cache = await caches.open(version);
|
||||
console.log("Installing", manifest, "version", version);
|
||||
// console.log("Installing", manifest, "version", version);
|
||||
await cache.addAll(manifest);
|
||||
// @ts-ignore
|
||||
self.skipWaiting(); // This automatically enables the service worker, preventing from caching stuff forever if there's a page open
|
||||
console.log("Installed");
|
||||
// console.log("Installed");
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user