fix: createRoutes

This commit is contained in:
Ricardo Gobbo de Souza 2018-02-02 15:15:57 -02:00
parent 10ac3ed2b4
commit 225021571a

View File

@ -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('/')