mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +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 = []
|
||||
files.forEach(file => {
|
||||
let keys = file
|
||||
.replace(`/^${pagesDir}/`, '')
|
||||
.replace(RegExp(`^${pagesDir}`), '')
|
||||
.replace(/\.(vue|js)$/, '')
|
||||
.replace(/\/{2,}/g, '/')
|
||||
.split('/')
|
||||
|
Loading…
Reference in New Issue
Block a user