You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if the service worker stops working when in dev mode, but I see nothing in cache in dev tools. I tried to log manifest, but it doesn't show up, not even an empty array. I followed the basic configuration guide, and the service worker gets registered.
`
"bundleFront": "parcel build ./src/jsLibsClient.js ./src/components/paymentScript.ts ./src/components/subscribeScript.ts ./src/serviceWorker.js --dist-dir ./assets/static"
import {manifest, version} from '@parcel/service-worker';
async function install() {
const cache = await caches.open(version);
await cache.addAll(manifest);
}
addEventListener('install', e => e.waitUntil(install()));
async function activate() {
const keys = await caches.keys();
await Promise.all(
keys.map(key => key !== version && caches.delete(key))
);
}
addEventListener('activate', e => e.waitUntil(activate()));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't know if the service worker stops working when in dev mode, but I see nothing in cache in dev tools. I tried to log manifest, but it doesn't show up, not even an empty array. I followed the basic configuration guide, and the service worker gets registered.
`
`
Beta Was this translation helpful? Give feedback.
All reactions