Subscribe on changes!

InheritAttrs not works in production mode

avatar
Dec 30th 2021

Version

3.2.26

Reproduction link

codesandbox.io

Steps to reproduce

  1. Run vite with --mode production
  2. Restart server

What is expected?

"hello" should be displayed

What is actually happening?

"default" is displayed


In src/components/Parent.vue:

<template v-if="true">
  <Child v-if="true" />
</template>
avatar
Dec 30th 2021

Not sure I would want to rate this a bug. the <template v-if></template> wrapper results in a Fragment root node, because it could potentially contain multiple child elements - and Fragments don't inherit attributes. Technically, that feels correct. Yet it works dev, so somthing is off.

Either way, this is a low-priority edge case.