From 9bac32eea4ca0289ef11dabff7e3d9cdca8afaa6 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 10 Mar 2018 20:08:23 -0500 Subject: [PATCH] allow server routes to be .ts files (or anything else) - fixes #57 --- src/core/create_routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/create_routes.ts b/src/core/create_routes.ts index 0e32303..611b589 100644 --- a/src/core/create_routes.ts +++ b/src/core/create_routes.ts @@ -3,7 +3,7 @@ import glob from 'glob'; import { src } from '../config'; import { Route } from '../interfaces'; -export default function create_routes({ files } = { files: glob.sync('**/*.+(html|js|mjs)', { cwd: src() }) }) { +export default function create_routes({ files } = { files: glob.sync('**/*.*', { cwd: src() }) }) { const routes: Route[] = files .map((file: string) => { if (/(^|\/|\\)_/.test(file)) return;