enable --module by default (#5738)

- fix corner case in `mangle`
This commit is contained in:
Alex Lam S.L
2022-11-21 18:25:34 +00:00
committed by GitHub
parent 21aff996a5
commit 68d62a8a31
17 changed files with 294 additions and 92 deletions

View File

@@ -373,7 +373,9 @@ describe("Directives", function() {
'function f(){}'
],
].forEach(function(test) {
var result = UglifyJS.minify(test[0]);
var result = UglifyJS.minify(test[0], {
module: false,
});
if (result.error) throw result.error;
assert.strictEqual(result.code, test[1], test[0]);
});