From 73c42938f7b07f8c16a4b677bde74cbaedd83c9c Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Fri, 19 Jan 2024 13:01:20 +0530 Subject: [PATCH] Fixed: Service worker registration error(dxp-253) --- src/registerServiceWorker.ts | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/registerServiceWorker.ts diff --git a/src/registerServiceWorker.ts b/src/registerServiceWorker.ts deleted file mode 100644 index 76cede07..00000000 --- a/src/registerServiceWorker.ts +++ /dev/null @@ -1,32 +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) - } - }) -}