aboutsummaryrefslogtreecommitdiffstats
path: root/dev.js
diff options
context:
space:
mode:
Diffstat (limited to 'dev.js')
-rw-r--r--dev.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/dev.js b/dev.js
index 4f9ab0c..fb46a72 100644
--- a/dev.js
+++ b/dev.js
@@ -63,6 +63,10 @@ Bun.serve({
? new Response(file, { headers: { 'content-type': 'image/webp', 'cache-control': NO_STORE } })
: new Response('Not found', { status: 404 });
}
+ if (/^\/icon(-maskable)?(-\d+)?\.(png|svg)$/.test(path)) {
+ const file = Bun.file('static' + path);
+ if (await file.exists()) return new Response(file, { headers: { 'cache-control': NO_STORE } });
+ }
const loc = path.match(/^\/locales\/([a-z]{2})\.json$/);
if (loc) {
const f = Bun.file('src/locales/' + loc[1] + '.json');