Hey there,
I've been working on a simple npm package simplifying Next.js routing by creating a routes.js file that reflects the file structure.
A /pages
folder that looks like this:
pages
├── users
│ └── [user].js
├── about-us.js
└── index.js
generates a routes.js
that looks like this
export const routes = {
aboutUs: '/about-us',
home: '/',
users: { user: { getRoute: (user) => `/user/${user}}` } }
}
The problem that I have is that I'm not sure if it will work correctly for every use case, so I'd like to find some open-source projects that have large and complicated /pages
folder that I can test on. Any tips?
Also, would this be useful for any of you?
Top comments (0)