Skip to content

Returning value of ref imported from other path isn't setup-ref #6825

@sxzz

Description

@sxzz

Vue version

3.2.40

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9kM1qwzAQhF9l0cUJxBJpb8Y29D10Sd2142D9oF2nBeN378oOpbSQm3Z29LEzi3qLUd9nVJWqqUtjZCDkObbWjy6GxLBAwh5W6FNwUGjDSKyZCuu74InB0QBN9hyOuxQm1FMYDrIQpTY7VoAyMLo4XRhlAqiv53ZZNsC61kambP+xqJPaTyjdJeobBS9HLvmjfSzIqgo2JWuSIs9WXZkjVcZQ3+VoN9IhDUZeOs2eR4cayZXvKXwSJgFbdfrFMCLeMZUJ/QcmTM+Yf6z/uBm7Wr9KlEdtEgG/tl739nK3DRyO0LRQnF9eC7V+A9njikI=

Steps to reproduce

Open reproduction, and make sure it's in production mode.

The page is empty, then switch to dev mode. It shows 123.

and we could see

/* Analyzed bindings: {
  "ref": "setup-maybe-ref",
  "msg": "setup-ref" // ⬅️ it should be setup-maybe-ref
} */

What is expected?

msg is setup-maybe-ref

What is actually happening?

msg is setup-ref

System Info

N/A

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions