Files
pokeshare/public/sw.js
T
nlevesque c5378f6008 Make the app installable (PWA metadata)
- manifest.webmanifest with name, standalone display, theme color
- PNG icons 192/512 + maskable variant + apple-touch-icon (from the
  Poké Ball favicon)
- minimal pass-through service worker (installability requirement)
- apple/mobile web app meta tags
2026-07-28 21:30:32 +02:00

17 lines
456 B
JavaScript

/**
* Minimal service worker — network pass-through.
* Its only job is to make the app installable (browsers require a service
* worker to offer "Install app"); no offline caching for now.
*/
self.addEventListener("install", (event) => {
self.skipWaiting();
});
self.addEventListener("activate", (event) => {
event.waitUntil(clients.claim());
});
self.addEventListener("fetch", (event) => {
event.respondWith(fetch(event.request));
});