mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This is a follow-up fix for #75474. When switching from `next dev` to `next start` locally, a user might have an existing HMR refresh hash session cookie. We need to make sure that the hash value is excluded from any `"use cache"` cache keys, when running with `next start`. Otherwise, the cache keys will be different when prerendering vs. handling a dynamic request, e.g. when executing a server action. In production, we now also omit the serialized `"$undefined"` value for the HMR refresh hash from the cache keys to keep them shorter.
16 lines
206 B
JavaScript
16 lines
206 B
JavaScript
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
const nextConfig = {
|
|
experimental: {
|
|
useCache: true,
|
|
},
|
|
logging: {
|
|
fetches: {
|
|
hmrRefreshes: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|