type/children from child different in prod/dev mode
Vue version
3.2.37
Link to minimal reproduction
Steps to reproduce
Open console in the SFC,download project, run build and preview
App.vue
<script setup lang="ts">
import { ref } from 'vue'
import { tabs } from './Tabs.ts'
</script>
<template>
<tabs>
<div>
First tab
</div>
<div v-if="false">
Hidden tab
</div>
</tabs>
</template>
Tabs.ts
import { defineComponent, h } from 'vue'
export const tabs = defineComponent({
setup(_, { slots }) {
const tabs = slots.default()
console.log(tabs[1].type)
console.log(tabs[1].children)
return () => {
return h('div', 'tabs')
}
}
})
What is expected?
Show the same type and children in dev and production mode
What is actually happening?
it shows Symbol(Comment) and v-if (the type and children from the v-if="false" tab) in the console
download project, run build and preview, it shows Symbol() and empty string as type and children.
System Info
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1 Pro
Memory: 70.72 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.4.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.12.1 - /opt/homebrew/bin/npm
Browsers:
Firefox: 101.0.1
Safari: 15.5
npmPackages:
vue: ^3.2.0 => 3.2.37
Any additional comments?
No response