try again with sw
This commit is contained in:
parent
eae6dac86a
commit
c661f0cf5f
|
@ -0,0 +1,16 @@
|
||||||
|
// https://github.com/NekR/self-destroying-sw
|
||||||
|
|
||||||
|
self.addEventListener("install", function (e) {
|
||||||
|
self.skipWaiting();
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener("activate", function (e) {
|
||||||
|
self.registration
|
||||||
|
.unregister()
|
||||||
|
.then(function () {
|
||||||
|
return self.clients.matchAll();
|
||||||
|
})
|
||||||
|
.then(function (clients) {
|
||||||
|
clients.forEach((client) => client.navigate(client.url));
|
||||||
|
});
|
||||||
|
});
|
|
@ -14,7 +14,7 @@ export default defineConfig({
|
||||||
cleanupOutdatedCaches: true,
|
cleanupOutdatedCaches: true,
|
||||||
},
|
},
|
||||||
includeAssets: ["**/*.(js|html|svg|png|jpg|jpeg|eot|woff|woff2|ttf)"],
|
includeAssets: ["**/*.(js|html|svg|png|jpg|jpeg|eot|woff|woff2|ttf)"],
|
||||||
filename: "service-worker.js",
|
filename: "sw.js",
|
||||||
manifest: {
|
manifest: {
|
||||||
short_name: "Pashto Dictionary",
|
short_name: "Pashto Dictionary",
|
||||||
name: "LingDocs Pashto Dictionary",
|
name: "LingDocs Pashto Dictionary",
|
||||||
|
|
Loading…
Reference in New Issue