Skip to content

Commit 5d10799

Browse files
committed
Show error messages from UglifyJs
Print out err.msg if it's available. Previously these error messages were ignored and it printed unhelpful "undefined"
1 parent e028ba3 commit 5d10799

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/optimize/UglifyJsPlugin.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ UglifyJsPlugin.prototype.apply = function(compiler) {
118118
} else {
119119
compilation.errors.push(new Error(file + " from UglifyJs\n" + err.message + " [" + file + ":" + err.line + "," + err.col + "]"));
120120
}
121+
} else if (err.msg) {
122+
compilation.errors.push(new Error(file + " from UglifyJs\n" + err.msg));
121123
} else
122124
compilation.errors.push(new Error(file + " from UglifyJs\n" + err.stack));
123125
} finally {

0 commit comments

Comments
 (0)