mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
fix pathToRegexp generate routes
This commit is contained in:
parent
591ef50a06
commit
749673c99b
@ -67,10 +67,9 @@ export default function () {
|
||||
console.error(`Could not generate the dynamic route ${route}, please add the mapping params in nuxt.config.js (generate.routeParams).`) // eslint-disable-line no-console
|
||||
return process.exit(1)
|
||||
}
|
||||
route = route + '?'
|
||||
const toPath = pathToRegexp.compile(route)
|
||||
const toPathRegexp = pathToRegexp.compile(route)
|
||||
routes = routes.concat(routeParams.map((params) => {
|
||||
return toPath(params)
|
||||
return toPathRegexp(params)
|
||||
}))
|
||||
} else {
|
||||
routes.push(route)
|
||||
|
Loading…
Reference in New Issue
Block a user