Browse Source

change back the check for adding a service worker because tests would get constant errors

pull/123/head
Trent Larson 3 months ago
parent
commit
089d4f0733
  1. 7
      src/registerServiceWorker.ts

7
src/registerServiceWorker.ts

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

Loading…
Cancel
Save