1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 09:56:51 +01:00
blog/public/sw.js
Matthias Kretschmann 05ad0470c2
migrate to biome (#944)
* migrate to biome

* cleanup

* fix

* use tsx

* script tweaks

* fix test runs

* path tweaks
2024-07-27 21:15:05 +01:00

15 lines
304 B
JavaScript

self.addEventListener('install', () => {
self.skipWaiting()
})
self.addEventListener('activate', () => {
self.registration
.unregister()
.then(() => self.clients.matchAll())
.then((clients) => {
for (const client of clients) {
client.navigate(client.url)
}
})
})