From b4207f27821617d83e4cf018c169ca3bac30fda1 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sun, 3 Jul 2022 21:40:47 +0200 Subject: new PWA implementation --- src/registerServiceWorker.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/registerServiceWorker.js (limited to 'src/registerServiceWorker.js') diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js deleted file mode 100644 index 1473a0a..0000000 --- a/src/registerServiceWorker.js +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint-disable no-console */ - -import { register } from "register-service-worker"; - -if (process.env.NODE_ENV === "production") { - register(`${process.env.BASE_URL}service-worker.js`, { - ready() { - console.log( - "App is being served from cache by a service worker.\n" + - "For more details, visit https://goo.gl/AFskqB" - ); - }, - registered() { - console.log("Service worker has been registered."); - }, - cached() { - console.log("Content has been cached for offline use."); - }, - updatefound() { - console.log("New content is downloading."); - }, - updated() { - console.log("New content is available; please refresh."); - }, - offline() { - console.log( - "No internet connection found. App is running in offline mode." - ); - }, - error(error) { - console.error("Error during service worker registration:", error); - }, - }); -} -- cgit v1.2.3