🐛 (notif)

This commit is contained in:
2020-07-02 13:23:39 +02:00
parent 4c3c657e8b
commit 7f78971377

View File

@@ -7,7 +7,9 @@ if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready(sw) {
console.log('App is being served from cache by a service worker')
setNotificationInstance(sw.showNotification)
setNotificationInstance((title, options?) =>
sw.showNotification(title, options)
)
},
registered() {
console.log('Service worker has been registered.')
@@ -20,7 +22,6 @@ if (process.env.NODE_ENV === 'production') {
},
updated() {
console.log('New content is available; please refresh.')
location.reload(true)
},
offline() {
console.log(