-
-
Notifications
You must be signed in to change notification settings - Fork 754
refactor: remove unused SWC helpers #12614
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
✅ Deploy Preview for rspack canceled.
|
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.
Pull request overview
This PR removes unused SWC helper infrastructure from the Ast context and minification logic, simplifying code paths that don't require helper injection capabilities.
- Removes
HelperDatafrom theContextstruct in the AST module - Eliminates
HELPERS.setwrappers from AST transform/view methods and the minification process - Cleans up related imports in both affected files
The JavaScriptTransformer in transform.rs correctly retains HELPERS support, as it processes external SWC plugins that may inject helpers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/rspack_javascript_compiler/src/compiler/minify.rs | Removes HELPERS.set wrapper from minification logic and cleans up the helpers import |
| crates/rspack_javascript_compiler/src/ast.rs | Removes HelperData field from Context struct, eliminates HELPERS.set calls in transform/view methods, and updates Debug implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🎉 Size decreased by 4.13KB from 47.87MB to 47.87MB (⬇️0.01%) |
1fd6668 to
66fe048
Compare
CodSpeed Performance ReportMerging #12614 will not alter performanceComparing Summary
Footnotes
|
b68473e to
f309a3e
Compare
This reverts commit 4835c97.
f309a3e to
21a4788
Compare
Summary
This PR removes the
HELPERS(SWC transform helpers) from theAstcontext and the minification logic inrspack_javascript_compiler.This simplifies the AST handling and removes unnecessary overhead from SWC helpers that were not being utilized.
Checklist