This is a fork of next-static-paths that supports next.js 13 app router.
Although Next.js 13.2 added experimental typeRoutes
feature for statically typed links -
we cannot easily search them as plain text.
See vercel/next.js#50118
Statically prevent HTTP 404 Not Found in your Next.js applications using TypeScript and code generation.
💻 A command-line interface to generate static types and custom route helper functions
🔗 A <TypedLink />
component which wraps Next.js <Link />
and provides type-safe path matching
📝 A pathFor
helper that enables path generation in a type-safe manner
$ pnpm add @nirtamir2/next-static-paths
# or
$ yarn add @nirtamir2/next-static-paths
# or
$ npm install @nirtamir2/next-static-paths
Then, from within your Next.js application root, run the following command:
# For pnpm users
$ pnpx @nirtamir2/next-static-paths
# For yarn users
$ yarn @nirtamir2/next-static-paths
# For npm users
$ npx @nirtamir2/next-static-paths