Nuxt/test/fixtures/module/modules/tapable/index.js

19 lines
448 B
JavaScript
Raw Normal View History

2017-07-17 19:38:02 +00:00
module.exports = function () {
let ctr = 1
// Add hook for module
this.nuxt.plugin('module', async moduleContainer => {
this.nuxt.__module_hook = moduleContainer && ctr++
})
// Add hook for renderer
this.nuxt.plugin('renderer', async renderer => {
this.nuxt.__renderer_hook = renderer && ctr++
})
// Add hook for build
this.nuxt.plugin('build', async builder => {
this.nuxt.__builder_hook = builder && ctr++
})
}