mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-21 14:55:04 +00:00
Merge pull request #39 from sveltejs/windows-nested-routes
use /, not path.sep, when creating routes
This commit is contained in:
@@ -5,7 +5,7 @@ module.exports = function create_matchers(files) {
|
|||||||
.map(file => {
|
.map(file => {
|
||||||
if (/(^|\/|\\)_/.test(file)) return;
|
if (/(^|\/|\\)_/.test(file)) return;
|
||||||
|
|
||||||
const parts = file.replace(/\.(html|js|mjs)$/, '').split(path.sep);
|
const parts = file.replace(/\.(html|js|mjs)$/, '').split('/'); // glob output is always posix-style
|
||||||
if (parts[parts.length - 1] === 'index') parts.pop();
|
if (parts[parts.length - 1] === 'index') parts.pop();
|
||||||
|
|
||||||
const id = (
|
const id = (
|
||||||
|
|||||||
Reference in New Issue
Block a user