diff --git a/index.js b/index.js index 8da21f4..ab3fa66 100644 --- a/index.js +++ b/index.js @@ -125,7 +125,7 @@ module.exports = function(opt) { }; try { - mangled = uglify.minify(String(file.contents), uglifyOptions); + mangled = await uglify.minify(String(file.contents), uglifyOptions); min_file.contents = new Buffer(mangled.code.replace(reSourceMapComment, '')); } catch (e) { this.emit('end'); diff --git a/package.json b/package.json index 5616209..ce53c5e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "ansi-colors": "^1.0.1", "minimatch": "^3.0.2", "plugin-error": "^0.1.2", - "terser": "^3.7.6", + "terser": "^5.5.1", "through2": "^2.0.3", "vinyl": "^2.1.0" },