Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 95f99fd

Browse files
authored
Merge pull request #39 from sveltejs/windows-nested-routes
use /, not path.sep, when creating routes
2 parents 9d48909 + 1bed4b0 commit 95f99fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/create_routes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function create_matchers(files) {
55
.map(file => {
66
if (/(^|\/|\\)_/.test(file)) return;
77

8-
const parts = file.replace(/\.(html|js|mjs)$/, '').split(path.sep);
8+
const parts = file.replace(/\.(html|js|mjs)$/, '').split('/'); // glob output is always posix-style
99
if (parts[parts.length - 1] === 'index') parts.pop();
1010

1111
const id = (

0 commit comments

Comments
 (0)