chore: cache png icons forever to lower vercel costs

This commit is contained in:
Nolan Lawson 2024-05-04 13:11:33 -07:00
parent 5889b404cb
commit 8f61ea75ce
3 changed files with 15 additions and 3 deletions

View File

@ -44,7 +44,13 @@ const JSON_TEMPLATE = {
}
},
{
src: '^/.*\\.(png|css|json|svg|jpe?g|map|txt|gz|webapp|woff|woff2)$',
src: '^/.*\\.(png|jpe?g)$',
headers: {
'cache-control': 'public,max-age=31536000,immutable'
}
},
{
src: '^/.*\\.(css|json|svg|map|txt|gz|webapp|woff|woff2)$',
headers: {
'cache-control': 'public,max-age=3600'
}

View File

@ -4,7 +4,7 @@
"version": "2.6.0",
"type": "module",
"engines": {
"node": "^12.20.0 || ^14.13.1 || ^16.0.0 || ^18.0.0"
"node": "^12.20.0 || ^14.13.1 || ^16.0.0 || ^18.0.0 || ^20.0.0"
},
"scripts": {
"lint": "standard && standard --plugin html 'src/routes/**/*.html'",

View File

@ -29,7 +29,13 @@
}
},
{
"src": "^/.*\\.(png|css|json|svg|jpe?g|map|txt|gz|webapp|woff|woff2)$",
"src": "^/.*\\.(png|jpe?g)$",
"headers": {
"cache-control": "public,max-age=31536000,immutable"
}
},
{
"src": "^/.*\\.(css|json|svg|map|txt|gz|webapp|woff|woff2)$",
"headers": {
"cache-control": "public,max-age=3600"
}