Skip to content

Commit 9868b4d

Browse files
authored
test(es/preset-env): Add entry import bench (#10722)
**Description:** See #10712 (comment)
1 parent 8084066 commit 9868b4d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/swc_ecma_preset_env/benches/polyfills.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ fn bench_cases(c: &mut Criterion) {
8181

8282
run(b, SOURCE, Default::default())
8383
});
84+
85+
c.bench_function("es/preset-env/entry/import", |b| {
86+
const SOURCE: &str = r#"
87+
import {} from "aaa.js";
88+
"#;
89+
90+
let config = Config {
91+
mode: Some(swc_ecma_preset_env::Mode::Entry),
92+
..Default::default()
93+
};
94+
run(b, SOURCE, config)
95+
});
8496
}
8597

8698
criterion_group!(benches, bench_cases);

0 commit comments

Comments
 (0)