-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(es/react): Run classic jsx transform before resolver pass #10697
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
Conversation
|
CodSpeed Performance ReportMerging #10697 will not alter performanceComparing Summary
|
|
Required Documentation Updates:
|
|
Since we've set |
|
Would it not be easier if we just change how we compare idents in jsx transform code? |
|
Why since if I'm reading it right you're basically abandoning name resolve here. |
The details have been provided in the comments. swc/crates/swc/src/config/mod.rs Lines 309 to 314 in 414b2f1
|
|
Isn't this a pretty breaking API change as well? Because users of the Rust API would have to change the pass order? |
It depends on how our Rust API users interact with SWC. To my knowledge, Rspack uses the I checked Turbopack’s implementation: it calls more granular functions (including If backward compatibility is desired, we can preserve the old behavior. The current PR breaks compatibility, but we can revert it. |
|
The most breaking change is that we removed a parameter from To preserve the old behavior, we could reintroduce this parameter. Internally, SWC would pass The second change is that That said, I lean towards keeping this breaking change. Why? Because it forces Rust’s compiler to flag all existing |
|
I also think we should keep this change, although I'm thinking about simply ignoring |
Related issue: