gdborton / webpack-parallel-uglify-plugin

A faster uglifyjs plugin.
466 stars 34 forks source link

uglify-js 3.9.3 Build vendor package large #63

Closed chencjfeng closed 3 years ago

chencjfeng commented 4 years ago

The latest npm install found that the uglify-js version used by webpack-parallel-uglify-plugin is 3.9.3. This version will cause the packaged files of node_modules to become very large, from the original 1.8M to 4.52M. But changing uglify-js to version 3.9.1 can be packaged normally, please solve this problem, or specify uglify-js version to 3.9.1 to make it work properly

image

image

gdborton commented 4 years ago

@chencjfeng I'm going to be doing some maintenance on this package, including updating dependencies. You should be able to work around this in the meantime by installing whichever 3.x version that you want to use in your project as a devDependency. I'm currently targeting uglify-js@^3.6.0, which should work w/ 3.9.3.

Any chance you know what the difference in size is from? Maybe a default option changed in UglifyJS?

gdborton commented 3 years ago

@chencjfeng I've updated to the latest version of uglify-js in the 2.0.0 release. It should be backwards compatible as long as you're on webpack 4+ and not using uglifyES. Otherwise you'll need to update webpack to either 4 or 5, and switch from uglifyES to terser.