ckastbjerg / next-type-safe-routes

Never should your users experience broken links again!
MIT License
70 stars 5 forks source link

make paths in plugin be system-independent #28

Closed osdiab closed 2 years ago

osdiab commented 2 years ago

Windows uses backslashes, causing the replace of "/pages" to fail. Additionally, if any directory up to the project contained /pages in it, it would have also failed.

This just assumes that the pages directory is always a child of the relevant src directory, which I think is safe.

Closes #27

ckastbjerg commented 2 years ago

Cool! Nice improvement ⚡