Skip to content

Conversation

@lmiller1990
Copy link
Member

Left some notes about debugging this here.

For some reason getting vm is different for components using the new <script setup> rfc - I have no idea why. I was able to work around it as shown in this PR... I don't really understand why this works. That said, it does work 🤷‍♂️ I did a dive into the implementation but it doesn't look like anything change in core that would break this.

If anyone can figure out what is different about <script setup> components that makes them un-findable with $refs like we currently do it, that'd be great. I would like to support the latest <script setup> rfc, so people can give more feedback about it.

@cexbrayat cexbrayat self-requested a review November 30, 2020 07:29
Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work tracking this down!

The fix is weird to be honest, but I don't know enough about <script setup> to offer an alternative. Might be good enough until the dust settles.

"@types/jest": "25.2.1",
"@types/node": "12.12.35",
"@vue/compiler-sfc": "^3.0.2",
"@vue/compiler-sfc": "3.0.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these an intended change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, <script setup> works completely differently in 3.0.2 and 3.0.3.

So kind of a breaking change - for <script setup> people. Those users are on the cutting edge anyway, so they probably know enough to figure out that they need the absolute latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants