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

Shouldn't there be a way to pass in a specified Uglify version? #102

Closed
fenomas opened this issue Aug 2, 2017 · 4 comments
Closed

Shouldn't there be a way to pass in a specified Uglify version? #102

fenomas opened this issue Aug 2, 2017 · 4 comments

Comments

@fenomas
Copy link

fenomas commented Aug 2, 2017

I've had an unpleasant issue where the current version of Uglify#harmony (3.0.27) minimizes my code fine, but the version inside this plugin (2.8.29) barfs. Paradoxically the only way I can figure out to fix this is to "downgrade" to the uglifyjs-webpack-plugin2 plugin (since it gets uglify via peer dependency).

Am I missing some obvious undocumented way to handle this? If not, would it not make sense to accept an optional passed-in library that overrides the embedded uglify dependency, like:

var newestUglify = require('uglify-js')
var plugins = [
	new UglifyPlugin({
		uglify: newestUglify,
	})
]

or some such?

Thanks!

@nifgraup
Copy link

nifgraup commented Aug 2, 2017

use the latest uglifyjs-webpack-plugin beta, it depeds on uglify-es 3

@michael-ciniawsky
Copy link
Member

npm i -D uglifyjs-webpack-plugin@beta (uglify-es)

@fenomas
Copy link
Author

fenomas commented Aug 2, 2017

Thanks! Maybe worth mentioning in the readme or similar.

@Ephs05msm
Copy link

@AndyHall @michael-ciniawsky this helped me out big time. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants