diff --git a/lib/build.js b/lib/build.js index d3596cb3e9..6f5e1c5a1a 100644 --- a/lib/build.js +++ b/lib/build.js @@ -210,7 +210,7 @@ function * generateRoutesAndFiles () { templateVars.router.routes = createRoutes(files, this.srcDir) if (typeof this.options.router.extendRoutes === 'function') { // let the user extend the routes - this.options.router.extendRoutes(templateVars.router.routes) + this.options.router.extendRoutes(templateVars.router.routes, r) } // Routes for Generate command this.routes = flatRoutes(templateVars.router.routes, '')