Registration failed with TypeError: Failed to register a ServiceWorker for scope
skychx opened this issue · comments
skychx commented
https://mdn.github.io/dom-examples/service-worker/simple-service-worker/
const registration = await navigator.serviceWorker.register('/sw.js', { scope: '/' });
⬇️
const registration = await navigator.serviceWorker.register('/sw.js', { scope: '/dom-examples/service-worker/simple-service-worker/' });