-
Notifications
You must be signed in to change notification settings - Fork 367
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(swc): fix transform core-js-pure incorrectly, allow using new decorator for js #4680
Conversation
🦋 Changeset detectedLatest commit: 49b231f The changes in this PR will be included in the next version bump. This PR includes changesets to release 257 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4680 +/- ##
==========================================
- Coverage 57.59% 53.74% -3.86%
==========================================
Files 672 664 -8
Lines 17794 18092 +298
Branches 3876 4143 +267
==========================================
- Hits 10249 9723 -526
- Misses 6934 7712 +778
- Partials 611 657 +46 ☔ View full report in Codecov by Sentry. |
Summary
Update swc-plugins, to fix:
🤖 Generated by Copilot at 3c3f9d4
This pull request updates the swc plugin dependencies and fixes the issue of transforming
core-js-pure
imports. It also adds support for the new decorator syntax for both TypeScript and JavaScript files, and adds test fixtures and cases to verify the functionality.Details
🤖 Generated by Copilot at 3c3f9d4
@modern-js/swc-plugins
in both@modern-js/libuild-plugin-swc
and@modern-js/builder-plugin-swc
packages to use the latest features and fixes (link, link)lockCorejsVersion
extension option of the swc plugin, which controls how the plugin transforms or preservescore-js-pure
imports (link, link, link)legacyDecorator
option of the swc plugin, which controls how the plugin transforms the new decorator syntax for TypeScript and JavaScript files (link, link, link, link, link, link)legacyDecorator
option for both TypeScript and JavaScript files, using themodernBuild
utility function and checking the output files for the@swc/helpers/esm/_decorate.js
import (link)Related Issue
Checklist
pnpm run change
.