typedRoutes
为静态类型链接提供实验性支持。此功能需要在你的项目中同时使用 App 路由和 TypeScript。
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true,
},
}
module.exports = nextConfig
为静态类型链接提供实验性支持。此功能需要在你的项目中同时使用 App 路由和 TypeScript。
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true,
},
}
module.exports = nextConfig