implement mangle.properties.domprops (#5686)

- support destructuring syntax
- fix corner case with comma operator
This commit is contained in:
Alex Lam S.L
2022-09-29 05:18:04 +01:00
committed by GitHub
parent a570c00251
commit bd5fc4cb1b
15 changed files with 94 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
var fs = require("fs");
new Function("exports", require("../tools/node").FILES.map(function(file) {
new Function("domprops", "exports", require("../tools/node").FILES.map(function(file) {
if (/exports\.js$/.test(file)) file = require.resolve("./exports");
return fs.readFileSync(file, "utf8");
}).join("\n\n"))(exports);
}).join("\n\n"))(require("../tools/domprops.json"), exports);