diff --git a/packages/nuxt/src/app/components/nuxt-error-boundary.ts b/packages/nuxt/src/app/components/nuxt-error-boundary.ts index 22b4c8ea51..a58516c1ce 100644 --- a/packages/nuxt/src/app/components/nuxt-error-boundary.ts +++ b/packages/nuxt/src/app/components/nuxt-error-boundary.ts @@ -11,9 +11,10 @@ export default defineComponent({ const error = ref(null) const nuxtApp = useNuxtApp() - onErrorCaptured((err) => { + onErrorCaptured((err, target, info) => { if (process.client && !nuxtApp.isHydrating) { emit('error', err) + nuxtApp.hooks.callHook('vue:error', err, target, info) error.value = err return false } diff --git a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts index bc591a04f5..e3816cd5bc 100644 --- a/packages/nuxt/src/app/components/nuxt-loading-indicator.ts +++ b/packages/nuxt/src/app/components/nuxt-loading-indicator.ts @@ -32,6 +32,7 @@ export default defineComponent({ const nuxtApp = useNuxtApp() nuxtApp.hook('page:start', indicator.start) nuxtApp.hook('page:finish', indicator.finish) + nuxtApp.hook('vue:error', indicator.finish) onBeforeUnmount(indicator.clear) return () => h('div', {