You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the prod mode, reactive values are not exposed in the setupResult object as the script setup gets inlined when using the script setup syntax. However, this does not occur in development mode or when using the regular setup() function that returns reactive values.
To address this, I have added a warning in the PR for this specific case. One potential solution could be to forbid the use of reactive as a ref completely. However, this approach might have implications for existing code and developer workflows, so it's essential to gather feedback from the team and carefully evaluate the trade-offs.
I'm looking forward to the team's input and suggestions on how to best resolve this issue. In the meantime, I am opening a PR proposing a potential solution, which I'm happy to discuss further with the team.
Vue version
3.4.21
Link to minimal reproduction
https://play.vuejs.org/#eNp9kF9LwzAUxb/KJS/rYLZOfRrdQGUPCv5BfTMipb2t2dokJGmtlH53b1pW9yCjFMK5v5ycezp2rXXY1MhWLHZY6TJxuOESIM5EA81ZrsyaMwFCwvKcM1jt8ccLnA0UcRoM5iRpkroOBPR9HOnRIyITOsXRkbX/YpsaoR1YdLVHRaWVcdCBkg+qlg6zBbkmqRMNQg+5URXMKOWMy1RJ60DDegKC94+5N53uBsEc1hvofASPqxLDUhWBJqynP47G5zdswZwlIhdFuLNKUgnDJc5SVWlRonnSTpADZ6vRzs+SslTf94PmTI2Lg55+Ybr/R9/Z1mucPRu0aBrkbJq5xBToxvH29RFbOk/DSmV1SfSJ4QvSdrXPOGI3tcwo9hE3pL0b+hWyeLPb1qG0h6V8UE/2A88ZdXx7YvW/uJfh1XCPGqUWPxs03pMKpEF4sWT9Ly2kxOo=
Steps to reproduce
Open vue playground then open devtools console and change prod\dev mode
What is expected?
The same behavior is expected in prod and dev mode. Reactive const will be filled in both cases
What is actually happening?
The Reactive constant is filled in dev mode, but always empty in prod
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: