expand symbol space to improve compression (#2460)

- give globally distinct names to distinct variables
- improve ability to compress cross-scoped
- introduce `options.rename` to `minify()`
- default `true` if both `compress` & `mangle`
This commit is contained in:
Alex Lam S.L
2017-11-19 19:29:51 +08:00
committed by GitHub
parent b80062c490
commit f4e2fb9864
4 changed files with 89 additions and 23 deletions

View File

@@ -323,7 +323,8 @@ describe("minify", function() {
Uglify.minify(ast, {
compress: {
sequences: false
}
},
mangle: false
});
assert.ok(stat.body);
assert.strictEqual(stat.print_to_string(), "a=x()");