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这有帮助吗?