diff --git a/packages/nuxt/src/app/components/nuxt-link.ts b/packages/nuxt/src/app/components/nuxt-link.ts index f38ddbd777..77006518a2 100644 --- a/packages/nuxt/src/app/components/nuxt-link.ts +++ b/packages/nuxt/src/app/components/nuxt-link.ts @@ -328,8 +328,9 @@ export function defineNuxtLink (options: NuxtLinkOptions) { const path = typeof to.value === 'string' ? to.value : isExternal.value ? resolveRouteObject(to.value) : router.resolve(to.value).fullPath + const normalizedPath = isExternal.value ? new URL(path, window.location.href).href : path await Promise.all([ - nuxtApp.hooks.callHook('link:prefetch', path).catch(() => {}), + nuxtApp.hooks.callHook('link:prefetch', normalizedPath).catch(() => {}), !isExternal.value && !hasTarget.value && preloadRouteComponents(to.value as string, router).catch(() => {}), ]) }