Skip to content

Commit

Permalink
fix(es/minifier): Fix insufficient logging (#10091)
Browse files Browse the repository at this point in the history
**Description:**

This PR makes the minifier use `report_change!()` for important messages instead of `trace_op!()`
  • Loading branch information
kdy1 authored Feb 25, 2025
1 parent 48f68db commit 9ee79c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/swc_ecma_minifier/src/compress/optimize/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ impl Optimizer<'_> {

ident.take();
} else if self.options.inline != 0 || self.options.reduce_vars {
trace_op!(
"inline: Decided to copy '{}{:?}' because it's simple",
report_change!(
"inline: Decided to inline '{}{:?}' because it's simple",
ident.sym,
ident.ctxt
);
Expand Down Expand Up @@ -674,10 +674,10 @@ impl Optimizer<'_> {
{
return;
}
trace_op!(
"inline: Decided to inline function '{}{:?}' as it's very simple",
f.ident.sym,
f.ident.ctxt
report_change!(
"inline: Decided to inline function `{}{:?}` as it's very simple",
i.sym,
i.ctxt
);

self.vars.inline_with_multi_replacer(&mut f.function.body);
Expand Down

0 comments on commit 9ee79c9

Please sign in to comment.