chore: pwa auto update

Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
Corentin Thomasset 2020-07-08 13:35:24 +02:00
parent f02a816eaa
commit 66c569f886
No known key found for this signature in database
GPG key ID: DBD997E935996158
3 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Next ## Next
- [feat] [humans.txt](/humans.txt) - [feat] [humans.txt](/humans.txt)
- [feat] pwa auto update on new changes
## 1.5.1 ## 1.5.1
- [feat] switched back to history mode (no more '#' in url) - [feat] switched back to history mode (no more '#' in url)

View file

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

View file

@ -19,5 +19,11 @@ module.exports = {
}) })
] ]
} }
},
pwa: {
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
}
} }
} }