New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error: "name
is specified more than once" when using named slots and v-bind if object has a key of name
#7572
Comments
name
is specified more than once" when using named slots and v-bind if object has a key of "name"name
is specified more than once" when using named slots and v-bind if object has a key of name
This should likely be addressed in the Volar repo, not here. |
would you mind clarifying why Volar? is it because of vue-tsc? 🤔 |
Because Volar/vue-tsc transforms the template into something TS can understand (a form of TSX). So your issue needs to be fixed in that step. Vue Core does not really have a say here in what TS sees. |
Please track vuejs/language-tools#2308. |
Thanks y'all for the clarification, much appreciated. |
Vue version
3.2.45
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-peyj9y?terminal=dev
Steps to reproduce
npm run build
What is expected?
I would expect Typescript to understand
name
shouldn't be merged with the object being passed to v-bind.What is actually happening?
TS fails to undertand the
name
prop in<slot />
is different from objects being bound to it.In this example,
<slot name="foo" v-bind="{ name: 'bar'}" />
clash and it breaks the build command.System Info
The text was updated successfully, but these errors were encountered: