Files
freeplanet/src-pwa/register-service-worker.js
Paolo Arena b2e760faa9 - fix: updated from Store to Component: using Watch with 'immediate' parameters! @Watch('todos_changed', { immediate: true, deep: true })
- fix immediate only if you need to change something very quickly... otherwise it not need.
- fix: modified become FALSE when is sent, otherwise infinite loop...
- fix: created 2 separate tables for POST and PATCH request.
2019-02-04 03:09:15 +01:00

39 lines
1.1 KiB
JavaScript

/*
* This file is picked up by the build system only
* when building for PRODUCTION
*/
import { register } from 'register-service-worker'
register(process.env.SERVICE_WORKER_FILE, {
ready() {
console.log('READY::: App is being served from cache by a service worker.')
},
registered(registration) { // registration -> a ServiceWorkerRegistration instance
console.log('REGISTERED::: !!!', process.env.SERVICE_WORKER_FILE)
},
cached(registration) {
console.log('CACHED::: Content has been cached for offline use.')
},
updatefound(registration) {
console.log('UPDATEFOUND::: New content is downloading.')
},
updated(registration) {
console.log('New content is available; please refresh.')
},
offline() {
console.log('No internet connection found. App is running in offline mode.')
},
error(err) {
console.error('Error during service worker registration:', err)
},
}
);
// ServiceWorkerRegistration: https://developer.mozilla.org/en-uk/docs/Web/API/ServiceWorkerRegistration
// "build": "quasar build -m pwa && workbox generateSW workbox-config.js",