Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 990f2e2

Browse files
committed
fix(uglify): use Compress API not ast.transform
- Bumps uglify-js peerDep to ^2.8.0
1 parent 1300447 commit 990f2e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"homepage": "https://github.com/webpack-contrib/uglifyjs-webpack-plugin",
4444
"peerDependencies": {
45-
"uglify-js": "^2.7.5",
45+
"uglify-js": "^2.8.0",
4646
"webpack": "^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc"
4747
},
4848
"dependencies": {

Diff for: src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class UglifyJsPlugin {
8787
const compress = uglify.Compressor(options.compress || {
8888
warnings: false
8989
}); // eslint-disable-line new-cap
90-
ast = ast.transform(compress);
90+
ast = compress.compress(ast);
9191
}
9292
if(options.mangle !== false) {
9393
ast.figure_out_scope(options.mangle || {});

0 commit comments

Comments
 (0)