Skip to content
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

InheritAttrs not works in production mode #5189

Closed
soc221b opened this issue Dec 30, 2021 · 1 comment
Closed

InheritAttrs not works in production mode #5189

soc221b opened this issue Dec 30, 2021 · 1 comment

Comments

@soc221b
Copy link

soc221b commented Dec 30, 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>
@LinusBorg
Copy link
Member

LinusBorg commented Dec 30, 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants