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

feat: allow prior babel plugins to traverse JSX tree thoroughly #87

Merged
merged 3 commits into from
Dec 30, 2019

Conversation

nandin-borjigin
Copy link
Contributor

close #86

@nandin-borjigin
Copy link
Contributor Author

@sodatea Any thoughts?

@nandin-borjigin nandin-borjigin changed the title feat: allow prior babel plugins to traverse JSX tree throughly feat: allow prior babel plugins to traverse JSX tree thoroughly Nov 19, 2019
@nickmessing
Copy link
Member

@Nandiin, nice PR, good idea, but with this PR it makes sense to change all sugar plugins to work without pre-traversing the Program, do you want to include that?

@nandin-borjigin
Copy link
Contributor Author

nandin-borjigin commented Dec 2, 2019

I'm happy to do that~ I'll make a PR later, after work, today.

Sorry for the late reply.

@nandin-borjigin
Copy link
Contributor Author

/ping @nickmessing

@nickmessing nickmessing merged commit 75825da into vuejs:dev Dec 30, 2019
@haoqunjiang
Copy link
Member

This change breaks functional-vue and inject-h because it would fail the hasJSX() check.
I'll revert the two packages as a quick fix for now.

haoqunjiang added a commit that referenced this pull request Oct 17, 2020
partially revert #87, fix functional-vue & inject-h in preset
fixes #165
haoqunjiang added a commit that referenced this pull request Oct 20, 2020
So that it can get the correct `this` scope.
Partially reverts #87.
Fixes #165 (comment)
haoqunjiang added a commit that referenced this pull request Oct 20, 2020
So that it can get the correct `this` scope.
Partially reverts #87.
Fixes #165 (comment)
@haoqunjiang
Copy link
Member

The change in v-model & v-on plugin needs to be reverted too, because they need to apply before arrow-functions to get the correct this scope.

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.

Replace JSXElement node on 'exit' instead of 'enter'.
3 participants