tatethurston / nextjs-routes

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

Type entry points in package.json #67

Closed MariaSolOs closed 2 years ago

MariaSolOs commented 2 years ago

This PR defines the types entry points for each export in public.package.json, allowing for the withRoutes function to be correctly typed when used in next.config.js or next.config.mjs.

If this change is approved, I can update the examples because the /** @type {import('next').NextConfig} */ above const { withRoutes } = require("nextjs-routes/next-config.cjs"); would not be needed anymore :)

tatethurston commented 2 years ago

Dropped the lock file changes, otherwise LGTM.

MariaSolOs commented 2 years ago

Dropped the lock file changes, otherwise LGTM.

Oops sorry about that. Thanks for the review!