typedRoutes
对 静态类型链接 的实验支持。此功能需要在项目中使用 App Router 和 TypeScript。
¥Experimental support for statically typed links. This feature requires using the App Router as well as TypeScript in your project.
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true,
},
}
module.exports = nextConfig