Browse Source

Immediately Load Latest App

20230320
MengYX 5 years ago
parent
commit
f7d19e62fd
No known key found for this signature in database GPG Key ID: E63F9C7303E8F604
  1. 3
      src/registerServiceWorker.js
  2. 9
      vue.config.js

3
src/registerServiceWorker.js

@ -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.')

9
vue.config.js

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

Loading…
Cancel
Save