Skip to content

Commit 963b088

Browse files
authored
fix(es/transforms): Pass unresolved_mark to simplifier instead of top_level_mark (#9989)
**Related issue:** - Closes #9981
1 parent 7b8bc85 commit 963b088

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.changeset/fuzzy-kangaroos-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
preset_env_base: patch
3+
---
4+
5+
fix(es/transforms): Pass `unresolved_mark` to `simplifier` instead of `top_level_mark`

.changeset/many-camels-chew.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
swc: patch
3+
swc_core: patch
4+
---
5+
6+
fix(es/transforms): Pass `unresolved_mark` to `simplifier` instead of `top_level_mark`

crates/swc/src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,13 @@ impl Options {
470470
match opts {
471471
SimplifyOption::Bool(allow_simplify) => {
472472
if *allow_simplify {
473-
Some(simplifier(top_level_mark, Default::default()))
473+
Some(simplifier(unresolved_mark, Default::default()))
474474
} else {
475475
None
476476
}
477477
}
478478
SimplifyOption::Json(cfg) => Some(simplifier(
479-
top_level_mark,
479+
unresolved_mark,
480480
SimplifyConfig {
481481
dce: DceConfig {
482482
preserve_imports_with_side_effects: cfg

0 commit comments

Comments
 (0)