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
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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));
|
||||
});
|
||||
Reference in New Issue
Block a user