chore(swc): optimize swc_core features#2294
chore(swc): optimize swc_core features#2294colinaaa wants to merge 1 commit intolynx-family:mainfrom
Conversation
|
📝 WalkthroughWalkthroughThis PR modifies three Cargo.toml files in the React transform package to optimize swc_core feature flags. It removes several unused features (ecma_parser, ecma_quote, ecma_transforms_react, ecma_visit, testing_transform) from main dependencies and reorganizes feature flags, moving test-specific features to dev-dependencies in the swc_plugin_compat crate. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will improve performance by 9.62%
Performance Changes
Comparing Footnotes
|
Web Explorer#7927 Bundle Size — 383.53KiB (0%).d4d98de(current) vs 4a17a62 main#7923(baseline) Bundle metrics
Bundle size by type
|
| Current #7927 |
Baseline #7923 |
|
|---|---|---|
252.58KiB |
252.58KiB |
|
95.85KiB |
95.85KiB |
|
35.1KiB |
35.1KiB |
Bundle analysis report Branch colinaaa:chore/optimize-swc-feat... Project dashboard
Generated by RelativeCI Documentation Report issue
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/react/transform/Cargo.toml`:
- Line 22: The swc_core dependency in Cargo.toml was pruned and must be restored
to include the features used by non-test code: add "ecma_visit" (needed for
VisitMut trait implementations referenced by swc_plugin_worklet_post_process,
swc_plugin_extract_str, swc_plugin_refresh, swc_plugin_compat_post) and
"ecma_quote" (needed for the quote! macro used in swc_plugin_extract_str and
swc_plugin_refresh) back into the swc_core features array so the feature list
includes "base", "ecma_codegen", "ecma_transforms_typescript",
"ecma_transforms_optimization", "ecma_visit", and "ecma_quote".
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/react/transform/Cargo.tomlpackages/react/transform/crates/swc_plugin_compat/Cargo.tomlpackages/react/transform/swc-plugin-reactlynx/Cargo.toml
|
@coderabbitai I've verified that the project compiles successfully with |
|
This pull request has been automatically marked as stale because it has not had recent activity. If this pull request is still relevant, please leave any comment (for example, "bump"). |
Summary by CodeRabbit
Checklist