Merge pull request #84 from translucentfocus/InitialPWASupport
Feature: Initial PWA Support (Service workers disabled)
This commit is contained in:
@@ -182,7 +182,7 @@ export default {
|
||||
context.fill();
|
||||
|
||||
favicon.href = canvas.toDataURL('image/png');
|
||||
} else favicon.href = "/favicon.ico"
|
||||
} else favicon.href = "./img/icon/favicon-32x32.png"
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@@ -7,6 +7,7 @@ import './components'
|
||||
import store from './store'
|
||||
import router from './plugins/router'
|
||||
import vueHeadful from 'vue-headful';
|
||||
//import './registerServiceWorker'
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
|
33
src/registerServiceWorker.js
Normal file
33
src/registerServiceWorker.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/* /* eslint-disable no-console */
|
||||
/*s
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user