Merge pull request #39 from sveltejs/windows-nested-routes

use /, not path.sep, when creating routes
This commit is contained in:
Rich Harris
2017-12-21 08:55:41 -05:00
committed by GitHub

View File

@@ -5,7 +5,7 @@ module.exports = function create_matchers(files) {
.map(file => {
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();
const id = (