-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
dx(runtime-core): warn on render child nodes in void element #12137
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
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-ssr
@vue/reactivity
@vue/compiler-sfc
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
@vue/compat
vue
commit: |
I don't think this is a correct fix.
If we really want to solve this issue
|
you're right, hydrate checks shouldn't be skipped no matter what. |
@yangxiuxiu1115 |
sure, I'd love to. |
7599b6f
to
44a6b08
Compare
I'm not sure about this. Consider this case: <script setup>
import { ref } from 'vue'
const tag = ref('input')
</script>
<template>
<component :is="tag">
<template v-if="tag !== 'input'">
Content
</template>
</component>
</template> This will show the warning and fail with SSR because the I also find it interesting that introducing an explicit <script setup>
import { ref } from 'vue'
const tag = ref('input')
</script>
<template>
<component :is="tag">
<template v-slot v-if="tag !== 'input'">
Content
</template>
</component>
</template> The extra My current feeling is that we should:
I think that example is misleading. From the perspective of an HTML parser (or the template parser in this case), the This is different from an example like But that isn't what's happening with the |
fix #12136