Update client cacher to allow numbers in extensions ( for woff2 )

This commit is contained in:
Madeline 2023-01-24 11:42:17 +11:00
parent 58b7a3c5f4
commit 363541c8e7

View File

@ -226,7 +226,9 @@ const processFile = async (asset) => {
...[...text.matchAll(/\.exports=.\..\+"(.*?\..{0,5})"/g)].map( ...[...text.matchAll(/\.exports=.\..\+"(.*?\..{0,5})"/g)].map(
(x) => x[1], (x) => x[1],
), // anything that looks like e.exports="filename.ext" ), // anything that looks like e.exports="filename.ext"
...[...text.matchAll(/\/assets\/(.*?\.[a-z]{0,5})/g)].map((x) => x[1]), // commonly matches `background: url(/assets/blah.svg)` ...[...text.matchAll(/\/assets\/(.*?\.[a-z0-9]{0,5})/g)].map(
(x) => x[1],
), // commonly matches `background: url(/assets/blah.svg)`
]); ]);
return [...ret].map((x) => x.replaceAll('"', "")); return [...ret].map((x) => x.replaceAll('"', ""));