tatethurston / nextjs-routes

Type safe routing for Next.js
MIT License
571 stars 23 forks source link

Remove npx nextjs-routes #63

Closed tatethurston closed 1 year ago

tatethurston commented 2 years ago

What

Remove cli invocation of nextjs-routes: eg npx nextjs-routes and yarn nextjs-routes.

Direct users to use automatic wiring instead:

+ const { withRoutes } = require("nextjs-routes/next-config.cjs");

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
};

- module.exports = nextConfig;
+ module.exports = withRoutes(nextConfig);

Why

This enables richer configuration in the future, leveraging withRoutes to supply any configuration options.

Rollout

A deprecation notice will log for usage of npx nextjs-routes and yarn nextjs-routes, directing to this issue. Any objects to this change can be raised on this issue. After a period of time if no persuasive objections are raised, this usage will removed from the package.