Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): avoid preloading external routes #8255

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/nuxt-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
unobserve = null
await Promise.all([
nuxtApp.hooks.callHook('link:prefetch', to.value as string).catch(() => {}),
preloadRouteComponents(to.value as string, router).catch(() => {})
!isExternal.value && preloadRouteComponents(to.value as string, router).catch(() => {})
])
prefetched.value = true
})
Expand Down