docs: fix the incrementalCacheHandlerPath (#52124)

The `incrementalCacheHandlerPath` have to be under `experimental`.
And the path should use `path` library so that the custom cache handler can be used.
This commit is contained in:
Hank Lin 2023-07-10 12:08:15 +08:00 committed by GitHub
parent af1948bde1
commit 2ef8938ff0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,9 @@ In Next.js, the [default cache handler](/docs/app/building-your-application/data
```js filename="next.config.js"
module.exports = {
incrementalCacheHandlerPath: './cache-handler.js',
experimental: {
incrementalCacheHandlerPath: require.resolve('./cache-handler.js'),
},
}
```