Commit Graph

4 Commits

Author SHA1 Message Date
Donny/강동윤
91d78000ea
feat(es/minifier): Implement drop_console (#3392)
swc_ecma_minifier:
 - Merge `drop_console` into pure optimizer.
 - Implement `drop_console`. (Closes #2321)
2022-01-28 16:08:41 +09:00
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
Donny/강동윤
8007b2dc93
feat(es/minifier): Handle array literals in sequences (#3348)
swc_ecma_minifier:
 - `sequences`: Implement more rules for array literals.
2022-01-24 21:10:20 +09:00
Donny/강동윤
2b2f6955f2
refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00