summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-24 11:42:17 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-24 11:42:17 +1100
commitaa57b9396b4384afb40c0c2d666124d6c36b4902 (patch)
tree2434a886a073af8014e71e24f96ac4011e4b40f6
parentUpdate lintstagedrc to run on js files as well (diff)
downloadserver-aa57b9396b4384afb40c0c2d666124d6c36b4902.tar.xz
Update client cacher to allow numbers in extensions ( for woff2 )
-rw-r--r--scripts/client.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/client.js b/scripts/client.js
index bc68547b..54a30863 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -226,7 +226,9 @@ const processFile = async (asset) => {
 		...[...text.matchAll(/\.exports=.\..\+"(.*?\..{0,5})"/g)].map(
 			(x) => x[1],
 		), // 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('"', ""));