next.js
6230c41d - Emit build error for unknown cache kinds

Commit
2 years ago
Emit build error for unknown cache kinds When a `"use cache"` directive with a custom cache kind is used, e.g. `"use cache: custom"`, a cache handler with the same name must be specified in the Next.js config: ```js /** * @type {import('next').NextConfig} */ const nextConfig = { experimental: { dynamicIO: true, cacheHandlers: { custom: require.resolve('path/to/custom/cache/handler'), }, }, } module.exports = nextConfig ``` If this is not the case, we emit a build error with an error message that explains this requirement. When we'll get a docs page for this experimental config, we will add the usual "Read more: ..." hint as well.
Author
Committer
bgw bgw
Parents
Loading