Skip to content

Commit 659ce0e

Browse files
committed
skip transpilation and polyfill
1 parent d805706 commit 659ce0e

File tree

1 file changed

+4
-1
lines changed
  • crates/swc_ecma_preset_env/src

1 file changed

+4
-1
lines changed

crates/swc_ecma_preset_env/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ where
5858
let f = transform_data::Feature::$feature;
5959
!exclude.contains(&f)
6060
&& (c.force_all_transforms
61-
|| (is_any_target
61+
|| (!is_any_target
6262
|| include.contains(&f)
6363
|| f.should_enable(&targets, c.bugfixes, $default)))
6464
}};
@@ -369,6 +369,9 @@ impl Polyfills {
369369
+ VisitMutWith<corejs2::Entry>
370370
+ VisitMutWith<corejs3::Entry>,
371371
{
372+
if self.targets.is_any_target() {
373+
return Default::default();
374+
}
372375
let required = match self.mode {
373376
None => Default::default(),
374377
Some(Mode::Usage) => {

0 commit comments

Comments
 (0)