From a00f1f9a81d6184d91514bc0dccce045623f869d Mon Sep 17 00:00:00 2001 From: Peter Jaszkowiak Date: Mon, 26 Mar 2018 13:37:53 -0600 Subject: [PATCH] Use uglify-es for ES6 support (#6402) --- install/package.json | 2 +- install/web.js | 2 +- src/meta/minifier.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/package.json b/install/package.json index c2cd3a18fb..7a88ccfde0 100644 --- a/install/package.json +++ b/install/package.json @@ -100,7 +100,7 @@ "spdx-license-list": "^3.0.1", "spider-detector": "1.0.18", "toobusy-js": "^0.5.1", - "uglify-js": "^3.3.4", + "uglify-es": "^3.3.9", "validator": "9.2.0", "winston": "^2.4.0", "xml": "^1.0.1", diff --git a/install/web.js b/install/web.js index 70163c45b0..792dfc6aee 100644 --- a/install/web.js +++ b/install/web.js @@ -8,7 +8,7 @@ var path = require('path'); var childProcess = require('child_process'); var less = require('less'); var async = require('async'); -var uglify = require('uglify-js'); +var uglify = require('uglify-es'); var nconf = require('nconf'); var Benchpress = require('benchpressjs'); diff --git a/src/meta/minifier.js b/src/meta/minifier.js index a7e2e422ed..53862c85d1 100644 --- a/src/meta/minifier.js +++ b/src/meta/minifier.js @@ -2,7 +2,7 @@ var fs = require('fs'); var os = require('os'); -var uglifyjs = require('uglify-js'); +var uglify = require('uglify-es'); var async = require('async'); var winston = require('winston'); var less = require('less'); @@ -178,7 +178,7 @@ function minifyJS_batch(data, callback) { scripts[filename] = file; try { - var minified = uglifyjs.minify(scripts, { + var minified = uglify.minify(scripts, { sourceMap: { filename: filename, url: filename + '.map', @@ -229,7 +229,7 @@ function minifyJS(data, callback) { scripts[ref.filename] = ref.source; }); - var minified = uglifyjs.minify(scripts, { + var minified = uglify.minify(scripts, { sourceMap: { filename: data.filename, url: data.filename + '.map',