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

<script setup> breaks v-model in production mode when using it to access data from a second script block with Options API data() #6241

Closed
adamsol opened this issue Jul 8, 2022 · 2 comments

Comments

@adamsol
Copy link

adamsol commented Jul 8, 2022

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNp9UNtOwzAM/ZUoLwNpbaQNCalsaPxHXkpjWKG54DgdaOq/43QFdUXCT/G55Bz5LJ9CKPsEspLa7Qhs6GqCR+0Ez651IZHoC+sNdHstPxLgl5ZCsWCnZmpeY4NtIBGBUpj8jXeRxOnImh5Q7MXd5iEbL9K5bTLAZ/BIwsBLnToS5wuax9RU39zOkTzIYeiWaJ6xaSVWq/U1N3CB3/fEZWxWSq5la3OPwtahfIve8XHGCD0RUcvqJ1RLvl7etTwShVgplVx4fy0bb9WBOYXJUWuhMN4etuWm3N4r00aa4yVEWzyjP0VATtRyajZ+rhjk8xUIzgAC/hu20F4FLrg/oTlz0G6QwzdZkavj

Steps to reproduce

Type something in the input.

What is expected?

No error.

What is actually happening?

ReferenceError: query is not defined

System Info

No response

Any additional comments?

The error occurs only in production mode.
There is no error if there is nothing in the <script setup> block.
There is no error if data is an arrow function.

@LinusBorg
Copy link
Member

See #6242 - the explanation in that issue also applies here. Solutions can be discussed in that ticket.

@LinusBorg
Copy link
Member

reopened for now, following discussion in #6242

@LinusBorg LinusBorg changed the title <script setup> breaks v-model in production mode <script setup> breaks v-model in production mode when using it to access data from a second script block with Options API data() Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants