typedRoutes
注意:此选项已被标记为稳定版本,因此你应该使用
typedRoutes而不是experimental.typedRoutes。
支持静态类型链接。此功能需要在你的项目中使用 TypeScript。
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
typedRoutes: true,
}
module.exports = nextConfig注意:此选项已被标记为稳定版本,因此你应该使用
typedRoutes而不是experimental.typedRoutes。
支持静态类型链接。此功能需要在你的项目中使用 TypeScript。
/** @type {import('next').NextConfig} */
const nextConfig = {
typedRoutes: true,
}
module.exports = nextConfig