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
iendeavor opened this issue Dec 30, 2021 · 1 comment
Closed

InheritAttrs not works in production mode #5189

iendeavor opened this issue Dec 30, 2021 · 1 comment

Comments

@iendeavor
Copy link

iendeavor 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.

@yyx990803 yyx990803 added this to Dev/Prod Inconsistency in Next Patch May 10, 2022
@yyx990803 yyx990803 moved this from Dev/Prod Inconsistency to Done in Next Patch May 11, 2022
iwusong pushed a commit to iwusong/core that referenced this issue May 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

2 participants