-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor(es/helpers): Remove unnecessary exports #9225
Conversation
_
CodSpeed Performance ReportMerging #9225 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to update code at packages/helpers/scripts/ast_grep.js, ensuring that the generation logic for CJS is correct.
Oh, yes! Working on it. 😆 |
There is some code logic that needs to be referred to at https://ast-grep.github.io. If you need help, please let us know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
swc-bump:
- dbg-swc
I'll merge once @magic-akari approves this PR |
There are some helpers from the 'tslib', should they be processed in the same way? @kdy1 |
Those are fine. My point was that extra exports are useless, but creates extra entries for some tree shaking thing in turbopack. |
@magic-akari Thank you for so detailed, kind review!! |
### What? Update `@swc/core` and `@swc/helpers`. ### Why? Updating `@swc/core` is about keeping in sync, and `@swc/helpers` update is about applying swc-project/swc#9225 by @devjiwonchoi, which is an important performance improvement for turbopack tree shaking. (Although tree shaking is not merged yet) ### How?
Update `@swc/core` and `@swc/helpers`. Updating `@swc/core` is about keeping in sync, and `@swc/helpers` update is about applying swc-project/swc#9225 by @devjiwonchoi, which is an important performance improvement for turbopack tree shaking. (Although tree shaking is not merged yet)
Description:
Helper methods were exporting twice,
_
and it's own function name.We can map the build script to export
_
as it's own name (filename).Therefore we export only once as
_
, and map the name on the build script.Closes #9203