Skip to content

Instantly share code, notes, and snippets.

@yann-yinn
Created January 1, 2019 21:05
Show Gist options
  • Save yann-yinn/34021bd21102fa00b0cdd099147e9bad to your computer and use it in GitHub Desktop.
Save yann-yinn/34021bd21102fa00b0cdd099147e9bad to your computer and use it in GitHub Desktop.
const { runImporters } = require('./lib/helpers')
module.exports = function Gustave() {
this.nuxt.hook('build:before', () => {
this.extendRoutes = function(routes, resolve) {
console.log('extendRoutes is called !') // this code is not called
routes.push({
name: '_gustave',
path: '/_gustave',
component: resolve(__dirname, 'components/hello.vue')
})
}
})
}
module.exports.meta = require('./package.json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment