From 43c843dbae71a868449cf22164adee8bf469b914 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 16 Jun 2026 20:35:58 -0400 Subject: [PATCH] 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 --- vercel.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 727a702d..01b6c02b 100644 --- a/vercel.json +++ b/vercel.json @@ -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" } + ] + } + ] }