ok
This commit is contained in:
12
public/sw.js
Normal file
12
public/sw.js
Normal file
@@ -0,0 +1,12 @@
|
||||
if ("serviceWorker" in navigator) {
|
||||
window.addEventListener("load", () => {
|
||||
navigator.serviceWorker
|
||||
.register("/service-worker.js")
|
||||
.then((registration) => {
|
||||
console.log(
|
||||
"Service Worker registered with scope:",
|
||||
registration.scope
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user