fix: filter splash files in service worker

This commit is contained in:
Nolan Lawson 2022-04-10 09:42:23 -07:00
parent db84c5937e
commit a109e86351
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,10 @@ const ON_DEMAND_CACHE = [
{
regex: /TwemojiCountryFlags\.woff2/,
cache: ASSETS
},
{
regex: /_splash\.png$/,
cache: WEBPACK_ASSETS
}
]
@ -39,6 +43,7 @@ const assets = __assets__
.filter(filename => !/emoji-.*?\.json$/.test(filename)) // useless to cache; it already goes in IndexedDB
.filter(filename => !/screenshot-.*?\.png/.test(filename)) // only used during PWA installation, don't bother caching
.filter(filename => !/TwemojiCountryFlags\.woff2/.test(filename)) // cache on-demand
.filter(filename => !/_splash\.png$/.test(filename)) // only used for iOS PWA splash screen, cache on-demand
// `shell` is an array of all the files generated by webpack
// also contains '/index.html' for some reason