升级并玩得开心!
next-static-paths静态地阻止使用Typescript和代码生成的下一个js应用程序中未找到HTTP 404。
一个命令行界面,用于生成静态类型和自定义路由助手功能
? a <TypedLink />组件将Next.js <Link />包装并提供类型安全路径匹配
助手的pathFor ,可以以类型安全的方式产生路径
$ pnpm add next-static-paths
# or
$ yarn add next-static-paths
# or
$ npm install next-static-paths然后,从您的next.js应用程序root中,运行以下命令:
# For pnpm users
$ pnpx next-static-paths
# For yarn users
$ yarn next-static-paths
# For npm users
$ npx next-static-paths 
