Disable aggressive static asset caching in development to fix HMR.
Co-authored-by: dennis <dennis@konkol.net>
This commit is contained in:
@@ -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",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user