Skip to content

Commit 98ff479

Browse files
authored
feat: don't generate polyfills when script target is Latest (#441)
1 parent b7b784a commit 98ff479

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rs-lib/src/polyfills/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ impl PolyfillVisitContext<'_, '_> {
9696
}
9797

9898
pub fn polyfills_for_target(target: ScriptTarget) -> Vec<Box<dyn Polyfill>> {
99+
if matches!(target, ScriptTarget::Latest) {
100+
return Vec::new();
101+
}
102+
99103
all_polyfills()
100104
.into_iter()
101105
.filter(|p| p.use_for_target(target))

0 commit comments

Comments
 (0)