Skip to content

typedRoutes

静态类型链接 的实验性支持。此功能需要在项目中使用 App Router 和 TypeScript。

¥Experimental support for statically typed links. This feature requires using the App Router as well as TypeScript in your project.

js
/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    typedRoutes: true,
  },
}

module.exports = nextConfig

Next.js v15.2 中文网 - 粤ICP备13048890号