improve usability (#5753)

This commit is contained in:
Alex Lam S.L
2022-12-02 04:14:07 +02:00
committed by GitHub
parent 59e385591c
commit 650e63c8aa
3 changed files with 17 additions and 4 deletions

View File

@@ -272,6 +272,7 @@ if (typeof options.sourceMap == "object" && "base" in options.sourceMap) {
if (specified["self"]) {
if (paths.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed");
if (!options.wrap) options.wrap = "UglifyJS";
if (!("toplevel" in options)) options.toplevel = false;
paths = UglifyJS.FILES;
} else if (paths.length) {
paths = simple_glob(paths);