From 80f57184c76382714752569b4aae8f42bfebff91 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 12 Jan 2026 14:51:56 +0000 Subject: [PATCH] Disable aggressive static asset caching in development to fix HMR. Co-authored-by: dennis --- next.config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 7218a2d..a7bfbf2 100644 --- a/next.config.ts +++ b/next.config.ts @@ -133,7 +133,11 @@ const nextConfig: NextConfig = { headers: [ { key: "Cache-Control", - value: "public, max-age=31536000, immutable", + // In dev, aggressive caching breaks HMR and can brick a tab with stale chunks. + value: + process.env.NODE_ENV === "production" + ? "public, max-age=31536000, immutable" + : "no-store", }, ], },