Skip to content

Commit

Permalink
[minify-js] print warnings better
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jun 4, 2018
1 parent 1ab4467 commit 46fd07e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/minify-js.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const error = require('./log').error;
const uglify = require('uglify-js');
const warn = require('./log').warn;
const withLineNumbers = require('./with-line-numbers');

module.exports = js => {
Expand All @@ -18,7 +18,7 @@ module.exports = js => {
}

if(result.warnings) {
error(result.warnings);
result.warnings.forEach(w => warn(w));
throw new Error(`Warnings generated while minifying javscript.`);
}
}
Expand Down

0 comments on commit 46fd07e

Please sign in to comment.