|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
|
import { register } from "register-service-worker"; |
|
|
import { register } from "register-service-worker"; |
|
|
|
|
|
|
|
|
// This used to be only done when: import.meta.env.NODE_ENV === "production"
|
|
|
if (import.meta.env.NODE_ENV === "production") { |
|
|
register("/sw_scripts-combined.js", { |
|
|
register("/sw_scripts-combined.js", { |
|
|
ready() { |
|
|
ready() { |
|
|
console.log( |
|
|
console.log( |
|
|
"App is being served from cache by a service worker.\n" + |
|
|
"App is being served from cache by a service worker.\n" + |
|
@ -30,4 +30,5 @@ register("/sw_scripts-combined.js", { |
|
|
error(error) { |
|
|
error(error) { |
|
|
console.error("Error during service worker registration:", error); |
|
|
console.error("Error during service worker registration:", error); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|