Disable aggressive static asset caching in development to fix HMR.

Co-authored-by: dennis <dennis@konkol.net>
This commit is contained in:
Cursor Agent
2026-01-12 14:51:56 +00:00
parent 9839d1ba7c
commit 80f57184c7

View File

@@ -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",
},
],
},