PWA: odświeżanie przy wykryciu aktualizacji

This commit is contained in:
2022-07-14 21:25:17 +02:00
parent f9aaf21f7a
commit 54b47d44e5
2 changed files with 7 additions and 5 deletions
+4 -4
View File
@@ -2,16 +2,16 @@ module.exports = {
pwa: {
workboxPluginModule: 'GenerateSW',
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
navigateFallback: '/index.html',
runtimeCaching: [
{
urlPattern: new RegExp('^https://stacjownik.eu-4.evennode.com/api/getSceneries'),
handler: 'NetworkFirst',
options: {
cacheName: 'sceneries-cache',
expiration: {
maxAgeSeconds: 24 * 60 * 60, // 24 hours
},
cacheName: 'sceneries-cache'
},
},
],