mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(kit): add hooks installation for bridge (#2045)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
parent
4706f0877f
commit
583679f9c8
@ -28,7 +28,11 @@ export function defineNuxtModule<OptionsT extends ModuleOptions> (input: NuxtMod
|
|||||||
|
|
||||||
// Install hooks
|
// Install hooks
|
||||||
if (mod.hooks) {
|
if (mod.hooks) {
|
||||||
nuxt.hooks.addHooks(mod.hooks)
|
if (isNuxt2(nuxt)) {
|
||||||
|
nuxt.addHooks(mod.hooks)
|
||||||
|
} else {
|
||||||
|
nuxt.hooks.addHooks(mod.hooks)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop if no install provided
|
// Stop if no install provided
|
||||||
|
Loading…
Reference in New Issue
Block a user