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

fix(es/resolver): Ignore names of jsx attributes #3289

Merged
merged 11 commits into from
Jan 17, 2022

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jan 17, 2022

Description:

swc_ecma_transforms_base:

BREAKING CHANGE:

Related issue (if exists):

@kdy1 kdy1 requested a review from kwonoj January 17, 2022 06:52
kwonoj
kwonoj previously approved these changes Jan 17, 2022
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

@kwonoj The resolver pass was attaching the same syntax context as the parameter, so onChange in

       <input
            onChange={function () {
            }}
        />

got same syntax context as onChange in the paramter. And as es2015::function_name pass clones onChange of onChange: fuction () {} (generated by jsx pass), it resulted in a bug.

@kdy1 kdy1 added this to the v1.2.131 milestone Jan 17, 2022
@kdy1 kdy1 marked this pull request as ready for review January 17, 2022 07:17
@kdy1 kdy1 merged commit 9a89895 into swc-project:main Jan 17, 2022
@kdy1 kdy1 deleted the minifier-2854 branch January 17, 2022 07:18
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Jan 19, 2022
This PR applies lots of patches, including

 - swc-project/swc#3303
 - swc-project/swc#3301
 - swc-project/swc#3287
 - swc-project/swc#3286
 - swc-project/swc#3289

  - swc-project/swc#3302
    - Fixes #33265

(Verified)

I'll undraft this after verifying
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
nevilm-lt pushed a commit to nevilm-lt/next.js that referenced this pull request Apr 22, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop code generated with JSX + ES5 onChange attribute via anonymous function
2 participants