It's neccessary to disable the internal Uglify rename pass with --no-rename when you use the pure_funcs flag, because if you enable both --compress and --mangle at the same time, the pure_funcs argument will have no effect; Uglify will rename symbols first and then not recognize them when encountered later. Using two uglify commands works of course, but it invokes the parser twice which makes it a bit slower.
Doc update assumes the use of uglify-js@3.x.
The lesser known internal Uglify rename pass runs before compress and should not be confused with mangle which runs after compress.
It's neccessary to disable the internal Uglify
rename
pass with--no-rename
when you use thepure_funcs
flag, because if you enable both--compress
and--mangle
at the same time, thepure_funcs
argument will have no effect; Uglify will rename symbols first and then not recognize them when encountered later. Using two uglify commands works of course, but it invokes the parser twice which makes it a bit slower.Doc update assumes the use of
uglify-js@3.x
.The lesser known internal Uglify
rename
pass runs beforecompress
and should not be confused withmangle
which runs aftercompress
.