Skip to content

Commit

Permalink
UglifyES options were never used when defined
Browse files Browse the repository at this point in the history
  • Loading branch information
DickSmith committed Dec 4, 2017
1 parent 00064c7 commit a6eed1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function processMessage(msgLocation, callback) {
// We do not check the cache here because we already determined that this asset yields a cache
// miss in the parent process.
const uglifier = message.options.uglifyES ? require('uglify-es') : require('uglify-js'); // eslint-disable-line global-require, max-len
const minifiedContent = minify(source, map, message.options.uglifyJS, uglifier);
const minifiedContent = minify(source, map, message.options.uglifyES || message.options.uglifyJS, uglifier);
cache.saveToCache(cacheKey, JSON.stringify({
source: minifiedContent.code,
map: minifiedContent.map,
Expand Down

0 comments on commit a6eed1e

Please sign in to comment.