|
@@ -42,6 +42,7 @@ function registerValidSW(swUrl: string, config?: Config) {
|
|
|
// At this point, the updated precached content has been fetched,
|
|
|
// but the previous service worker will still serve the older
|
|
|
// content until all client tabs are closed.
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
console.log(
|
|
|
'New content is available and will be used when all ' +
|
|
|
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
|
@@ -55,6 +56,7 @@ function registerValidSW(swUrl: string, config?: Config) {
|
|
|
// At this point, everything has been precached.
|
|
|
// It's the perfect time to display a
|
|
|
// "Content is cached for offline use." message.
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
console.log('Content is cached for offline use.');
|
|
|
|
|
|
// Execute callback
|
|
@@ -67,6 +69,7 @@ function registerValidSW(swUrl: string, config?: Config) {
|
|
|
};
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
console.error('Error during service worker registration:', error);
|
|
|
});
|
|
|
}
|
|
@@ -95,6 +98,7 @@ function checkValidServiceWorker(swUrl: string, config?: Config) {
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
console.log(
|
|
|
'No internet connection found. App is running in offline mode.'
|
|
|
);
|
|
@@ -123,6 +127,7 @@ export function register(config?: Config) {
|
|
|
// Add some additional logging to localhost, pointing developers to the
|
|
|
// service worker/PWA documentation.
|
|
|
navigator.serviceWorker.ready.then(() => {
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
console.log(
|
|
|
'This web app is being served cache-first by a service ' +
|
|
|
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|