diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index c2d793e0516..d23b8e8d087 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -223,7 +223,7 @@ where thread::current().name() ); - { + if self.options.hoist_vars || self.options.hoist_fns { let data = analyze(&*n, self.module_info, Some(self.marks)); let mut v = decl_hoister(