diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js index 0ecdbe2..17ec2fd 100644 --- a/src/registerServiceWorker.js +++ b/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.') diff --git a/vue.config.js b/vue.config.js index b18220b..bbe992c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,9 @@ module.exports = { publicPath: '', - productionSourceMap: true -}; \ No newline at end of file + productionSourceMap: true, + pwa: { + workboxOptions: { + skipWaiting: true + } + } +};