fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

Every file in pages is still a route, how to disable them and only allow routes defined through next-routes to exist? #44

Closed exogenesys closed 7 years ago

exogenesys commented 7 years ago

I have defined the routes, all of them with parameters. But still, I can access them without parameters. Next-routes is not overriding the routes defined by next. How do I fix this?

Thanks a lot!

fridays commented 7 years ago

If you define the routes without parameters, they will override the original file based routes.

It should soon be possible to disable file based routes completely: https://github.com/zeit/next.js/pull/914

exogenesys commented 7 years ago

Cool, thanks a lot. :)

goldensunliu commented 7 years ago

following the merge closely. and will help when it is in a stable release of next.js