fix: filter splash files in service worker
This commit is contained in:
parent
db84c5937e
commit
a109e86351
|
@ -26,6 +26,10 @@ const ON_DEMAND_CACHE = [
|
||||||
{
|
{
|
||||||
regex: /TwemojiCountryFlags\.woff2/,
|
regex: /TwemojiCountryFlags\.woff2/,
|
||||||
cache: ASSETS
|
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 => !/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 => !/screenshot-.*?\.png/.test(filename)) // only used during PWA installation, don't bother caching
|
||||||
.filter(filename => !/TwemojiCountryFlags\.woff2/.test(filename)) // cache on-demand
|
.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
|
// `shell` is an array of all the files generated by webpack
|
||||||
// also contains '/index.html' for some reason
|
// also contains '/index.html' for some reason
|
||||||
|
|
Loading…
Reference in New Issue