Skip to content

Commit 1029a90

Browse files
Update path regex to windows users
1 parent c1e5dd4 commit 1029a90

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ module.exports = function router (routesDir, config) {
5656
let extPattern = new RegExp(path.extname(routeFile) + '$')
5757
if (!route.path) {
5858
route.path = '/' + path.relative(routesDir, routeFile).replace(extPattern, '')
59+
//Fix issue with windows paths
60+
route.path = route.path.replace(/\\/, '/')
5961
}
6062
return route
6163
})

0 commit comments

Comments
 (0)