Skip to content
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: downgrade browser targets for swc transformer #689

Merged
merged 1 commit into from Aug 8, 2023

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Aug 6, 2023

降级 SWC 作为 transformer 时 browser 产物的 targets 为 { ie: 11 },确保产物是 ES5,与 Babel 保持一致。

补充说明:esbuild 的 targets 之所以是 chrome 版本号,是因为很多高级语法它最多只能转换到 ES6,如果设置为 { ie: 11 } 会报错,但 SWC 有这个能力,所以没必要和 esbuild 一样使用 chrome 版本号

cc @MadCcc @huarse

@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (8aa2415) 93.80% compared to head (d1fd0be) 93.80%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #689   +/-   ##
=======================================
  Coverage   93.80%   93.80%           
=======================================
  Files          54       54           
  Lines        1534     1534           
  Branches      345      364   +19     
=======================================
  Hits         1439     1439           
+ Misses         95       90    -5     
- Partials        0        5    +5     
Files Changed Coverage Δ
src/builder/utils.ts 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PeachScript PeachScript merged commit 08f592c into master Aug 8, 2023
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/downgrade-swc-targets branch August 8, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant