mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
fix: createRoutes
This commit is contained in:
parent
10ac3ed2b4
commit
225021571a
@ -258,7 +258,7 @@ exports.createRoutes = function createRoutes(files, srcDir, pagesDir) {
|
|||||||
let routes = []
|
let routes = []
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
let keys = file
|
let keys = file
|
||||||
.replace(`/^${pagesDir}/`, '')
|
.replace(RegExp(`^${pagesDir}`), '')
|
||||||
.replace(/\.(vue|js)$/, '')
|
.replace(/\.(vue|js)$/, '')
|
||||||
.replace(/\/{2,}/g, '/')
|
.replace(/\/{2,}/g, '/')
|
||||||
.split('/')
|
.split('/')
|
||||||
|
Loading…
Reference in New Issue
Block a user