build(vercel): no-cache headers for HTML + service worker

Adds Cache-Control: no-cache,must-revalidate for the entry HTML (/ , *.html)
and sw.min.js so Vercel-served domains (and any CDN/browser in front) always
revalidate the shell and pick up new deploys, mirroring netlify.toml. Hashed
JS/CSS keep far-future caching via their content-hashed filenames.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-06-16 20:35:58 -04:00
1 parent c79120ba04
commit 43c843dbae
1 file changed
+21 -1
+21 -1
View File
@@ -1,5 +1,25 @@
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"installCommand": "npm install"
"installCommand": "npm install",
"headers": [
{
"source": "/sw.min.js",
"headers": [
{ "key": "Cache-Control", "value": "no-cache, must-revalidate" }
]
},
{
"source": "/",
"headers": [
{ "key": "Cache-Control", "value": "no-cache, must-revalidate" }
]
},
{
"source": "/(.*\\.html)",
"headers": [
{ "key": "Cache-Control", "value": "no-cache, must-revalidate" }
]
}
]
}