mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 03:25:24 +00:00
Merge branch 'master' into collision
This commit is contained in:
@@ -7,6 +7,8 @@ export default function create_routes({ files } = { files: glob.sync('**/*.*', {
|
||||
const routes: Route[] = files
|
||||
.filter((file: string) => !/(^|\/|\\)_/.test(file))
|
||||
.map((file: string) => {
|
||||
if (/(^|\/|\\)(_|\.(?!well-known))/.test(file)) return;
|
||||
|
||||
if (/]\[/.test(file)) {
|
||||
throw new Error(`Invalid route ${file} — parameters must be separated`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user