From 225021571a2a0bcd68533f6b7665ecbaafc75bc4 Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Fri, 2 Feb 2018 15:15:57 -0200 Subject: [PATCH] fix: createRoutes --- lib/common/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/utils.js b/lib/common/utils.js index 59e3f15c25..710eccf519 100644 --- a/lib/common/utils.js +++ b/lib/common/utils.js @@ -258,7 +258,7 @@ exports.createRoutes = function createRoutes(files, srcDir, pagesDir) { let routes = [] files.forEach(file => { let keys = file - .replace(`/^${pagesDir}/`, '') + .replace(RegExp(`^${pagesDir}`), '') .replace(/\.(vue|js)$/, '') .replace(/\/{2,}/g, '/') .split('/')