1
0
forked from um/web

Immediately Load Latest App

This commit is contained in:
MengYX 2020-02-23 13:42:50 +08:00
parent 86d59f4e6f
commit f7d19e62fd
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
2 changed files with 9 additions and 3 deletions

View File

@ -20,7 +20,8 @@ if (process.env.NODE_ENV === 'production') {
console.log('New content is downloading.')
},
updated() {
console.log('New content is available; please refresh.')
console.log('New content is available.');
window.location.reload();
},
offline() {
console.log('No internet connection found. App is running in offline mode.')

View File

@ -1,4 +1,9 @@
module.exports = {
publicPath: '',
productionSourceMap: true
productionSourceMap: true,
pwa: {
workboxOptions: {
skipWaiting: true
}
}
};