dx(runtime-core): warn on render child nodes in void element#12137
dx(runtime-core): warn on render child nodes in void element#12137yangxiuxiu1115 wants to merge 4 commits into
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