swc/crates/swc_ecma_minifier/tests/single-pass/1/output.js
Donny/강동윤 68e9017376
fix(es/minifier): Improve minifier (#3350)
swc_ecma_transforms_optimization:
 - `expr_simplifier`: Track more changes.

swc_ecma_minifier:
 - Analyze after applying the pure optimizer.
 - Preserve access to a variable not in scope.
 - `compress`: Remove string literal if it was not a directive.
 - `pure/collapse_vars`: Merge vars declared in the first statement into one with initializers if `collapse_vars` and `join_vars` are enabled.
 - `unused`: Use `usage_count` instead of `ref_count`.
 - `unused`: Fix dropping rule for member expressions.
 - `unused`: Fix dropping rule for declarations.
 - `hoist_props`: Preserve exported items.
2022-01-27 15:36:22 +09:00

13 lines
338 B
JavaScript

function foo() {
return "string";
}
var condString, exprAny1, exprBoolean1, exprNumber1, exprString1, exprIsObject1, exprAny2, exprBoolean2, exprNumber2, exprString2, exprIsObject2, array = [
"1",
"2",
"3"
];
condString.toUpperCase, foo(), array[1], foo();
condString.toUpperCase;
foo(), array[1];
condString.toUpperCase;