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

Commit

Permalink
fix(uglify): use Compress API not ast.transform
Browse files Browse the repository at this point in the history
  - Bumps uglify-js peerDep to ^2.8.0
  • Loading branch information
joshwiens committed Jun 29, 2017
1 parent 1300447 commit 990f2e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"homepage": "https://github.com/webpack-contrib/uglifyjs-webpack-plugin",
"peerDependencies": {
"uglify-js": "^2.7.5",
"uglify-js": "^2.8.0",
"webpack": "^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class UglifyJsPlugin {
const compress = uglify.Compressor(options.compress || {
warnings: false
}); // eslint-disable-line new-cap
ast = ast.transform(compress);
ast = compress.compress(ast);
}
if(options.mangle !== false) {
ast.figure_out_scope(options.mangle || {});
Expand Down

0 comments on commit 990f2e2

Please sign in to comment.