diff --git a/static/app.js b/static/app.js index 26cccaf..511aa19 100644 --- a/static/app.js +++ b/static/app.js @@ -1,10 +1,11 @@ (async function () { + console.log("Registering service worker..."); if ("serviceWorker" in navigator) { try { const registration = await navigator.serviceWorker.register( "sw.js", { - scope: "./", + scope: window.location.path, }, ); if (registration.installing) { @@ -14,6 +15,7 @@ } else if (registration.active) { console.log("Service worker active"); } + console.log(registration); } catch (error) { console.error(`Registration failed with ${error}`); }