Mangling, compression and what each saves
Whitespace and comment removal is the easy win. Mangling gives the biggest additional drop in code with long local names, since calculateMonthlyPayment inside a function becomes a one- or two-letter name. Compression handles structural shortcuts such as folding constant expressions and dropping unreachable branches.
Switch each option off in turn to see its contribution on your own code. With both off, you still get a smaller file from stripped whitespace and comments. A common workflow: minify with both on, compare the gzip number, and ship the gzip-friendly output with server compression enabled.
- Mangle names: shortens local identifiers only; top-level names stay.
- Compress: applies Terser's code-level optimizations.
- Gzip estimate: compare this, not the raw byte count, against your page-weight budget.