Skip to content

Commit

Permalink
fix(module): add hook build:before when disabled keepDefaultRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Feb 13, 2019
1 parent f654866 commit 58109e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function routerModule(moduleOptions) {

// Disable parsing `pages/`
if (!options.keepDefaultRouter) {
this.nuxt.options.build.createRoutes = () => {
return []
}

return
return this.nuxt.hook('build:before', () => {
this.nuxt.options.build.createRoutes = () => {
return []
}
})
}

// Put default router as .nuxt/defaultRouter.js
Expand Down

0 comments on commit 58109e4

Please sign in to comment.