🔀 Merge pull request #1902 from he0119/fix/pwa-runtimeCaching

fix(pwa): should always fetch conf.yml first
This commit is contained in:
Alicia Sykes 2025-08-13 16:23:41 +01:00 committed by GitHub
commit 6e843cfe66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,6 +337,18 @@ module.exports = {
/^manifest.*\.js$/, // default value
/\.nojekyll$/,
/\.gitignore$/,
/conf\.yml$/, // ignore config for runtimeCaching
],
// https://developer.chrome.com/docs/workbox/modules/workbox-build#type-RuntimeCaching
runtimeCaching: [
{
urlPattern: /conf\.yml$/,
handler: 'NetworkFirst',
options: {
cacheName: 'config-cache',
networkTimeoutSeconds: 3,
},
},
],
},
},