diff --git a/crates/oxc_minifier/src/lib.rs b/crates/oxc_minifier/src/lib.rs index 273921c3b..93c6f2de5 100644 --- a/crates/oxc_minifier/src/lib.rs +++ b/crates/oxc_minifier/src/lib.rs @@ -46,12 +46,12 @@ impl<'a> Minifier<'a> { let ret = Parser::new(&allocator, self.source_text, self.source_type).parse(); let ret = AstLower::new(&allocator, self.source_type).build(&ret.program); let mut program = ret.program; - let mut semantic = ret.semantic; + let semantic = ret.semantic; + let mut semantic = + Compressor::new(&allocator, semantic, self.options.compress).build(&mut program); if self.options.mangle { semantic.mangle(); } - let semantic = - Compressor::new(&allocator, semantic, self.options.compress).build(&mut program); Printer::new(self.source_text.len(), self.options.print) .with_mangle(semantic.symbol_table, self.options.mangle) .build(&program)