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