The nuxt-link
component does not respect the external prop
#25866
Labels
nuxt-link
component does not respect the external prop
#25866
Environment
Darwin
v21.1.0
3.10.2
3.10.1
2.8.1
npm@10.2.0
-
ssr
,target
,experimental
,app
,vue
,css
,modules
,storyblok
,build
,vite
,nitro
,hooks
,routeRules
,imports
,runtimeConfig
,devtools
@storyblok/nuxt@6.0.4
,@pinia/nuxt@0.5.1
-
Reproduction
https://stackblitz.com/edit/github-prqbf9?file=app.vue
Describe the bug
If you use a
nuxt-link
with thecustom
andexternal
prop and click on it, a console.error will occur complaing about the nuxt-link not having the external prop set to true, even though it is.The navigation itself still works, its just a console.error that occurs before you leave the page.
The interesting part is that the
replace
prop is respected, but notexternal
.Additional context
I think the issue is coming from this file:
https://github.com/nuxt/nuxt/blob/9326b7a8bde1ae793ba046f7dacc4ebbe200b786/packages/nuxt/src/app/components/nuxt-link.ts#L357C15-L357C23
The replace prop is included here, but not external.
Logs
No response
The text was updated successfully, but these errors were encountered: