mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +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,8 +28,12 @@ export function defineNuxtModule<OptionsT extends ModuleOptions> (input: NuxtMod
|
||||
|
||||
// Install hooks
|
||||
if (mod.hooks) {
|
||||
if (isNuxt2(nuxt)) {
|
||||
nuxt.addHooks(mod.hooks)
|
||||
} else {
|
||||
nuxt.hooks.addHooks(mod.hooks)
|
||||
}
|
||||
}
|
||||
|
||||
// Stop if no install provided
|
||||
if (typeof mod.setup !== 'function') {
|
||||
|
Loading…
Reference in New Issue
Block a user