From 8a88136c1fced208a0b6092cce57374d2016cd0e Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Tue, 10 Feb 2026 00:53:19 +0000 Subject: [PATCH 1/4] fix(md-exports): Normalize CSS module and font hashes for stable cache keys The previous fix stripped script/link/style tags but missed build-specific hashes embedded in the HTML body itself: - next/font variable classes on (e.g., __variable_c58dd6) - CSS module class name hashes (e.g., style_sidebar__iEJoR, 60+ occurrences) - /_next/static/media/ content hashes (e.g., sentry-logo-dark.fc8e1eeb.svg) These change on every Next.js rebuild even when content is unchanged, causing 100% cache miss rates. Verified locally: back-to-back builds now achieve 99.99% cache hit rate (9447/9448 files), with the single miss being a legitimate content change. Co-Authored-By: Claude --- scripts/generate-md-exports.mjs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/generate-md-exports.mjs b/scripts/generate-md-exports.mjs index 3fba2df2519e5..f8500c105e37f 100644 --- a/scripts/generate-md-exports.mjs +++ b/scripts/generate-md-exports.mjs @@ -30,7 +30,7 @@ import {remove} from 'unist-util-remove'; const DOCS_ORIGIN = process.env.NEXT_PUBLIC_DEVELOPER_DOCS ? 'https://develop.sentry.dev' : 'https://docs.sentry.io'; -const CACHE_VERSION = 4; +const CACHE_VERSION = 5; const CACHE_COMPRESS_LEVEL = 4; const R2_BUCKET = process.env.NEXT_PUBLIC_DEVELOPER_DOCS ? 'sentry-develop-docs' @@ -415,6 +415,9 @@ const md5 = data => createHash('md5').update(data).digest('hex'); * -