Environment
Nuxi 3.0.0-rc.10
RootDir: /sandbox
Nuxt project info:
- Operating System:
Linux
- Node Version:
v14.19.3
- Nuxt Version:
3.0.0-rc.10
- Nitro Version:
0.5.3
- Package Manager:
yarn@1.22.19
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
https://codesandbox.io/s/jolly-sky-uz9ovm?file=/pages/index.vue
Here's a snippet of the juicy bit:
<NuxtLink v-slot="{ href }" to="/foo" custom>
<a :href="href">Here's a link</a>
</NuxtLink>
Describe the bug
When using a NuxtLink component with custom attribute, a warning is logged.
Additional context
In RC 8 it was working fine, my suspicion is that the new link prefetching feature is to blame.
Suspicious line of code: https://github.com/nuxt/framework/blob/v3.0.0-rc.10/packages/nuxt/src/app/components/nuxt-link.ts#L229
Maybe worth to mention, a workaround is to use vue router's RouterLink component directly instead of NuxtLink
Logs
[Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
Environment
Nuxi 3.0.0-rc.10
RootDir: /sandbox
Nuxt project info:
Linuxv14.19.33.0.0-rc.100.5.3yarn@1.22.19vite---Reproduction
https://codesandbox.io/s/jolly-sky-uz9ovm?file=/pages/index.vue
Here's a snippet of the juicy bit:
Describe the bug
When using a NuxtLink component with custom attribute, a warning is logged.
Additional context
In RC 8 it was working fine, my suspicion is that the new link prefetching feature is to blame.
Suspicious line of code: https://github.com/nuxt/framework/blob/v3.0.0-rc.10/packages/nuxt/src/app/components/nuxt-link.ts#L229
Maybe worth to mention, a workaround is to use vue router's RouterLink component directly instead of NuxtLink
Logs