Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not support es6 minification after upgrade to 0.4.6 #49

Closed
lili21 opened this issue Jun 22, 2017 · 15 comments

Comments

Projects
None yet
7 participants
@lili21
Copy link

commented Jun 22, 2017

the 0.4.6 version move the uglify2 to dependencies, so I can't specify the uglify2 version through yarn add git://github.com/mishoo/UglifyJS2#harmony-v2.8.22 --dev. cause the plugin will use its own dependency - uglify-js^2.8.29.

@pkeuter

This comment has been minimized.

Copy link

commented Jun 22, 2017

Duplicate of #32. See #32 (comment) for a workaround.

sandfox added a commit to sandfox/uglifyjs-webpack-plugin that referenced this issue Jun 22, 2017

@paulpflug

This comment has been minimized.

Copy link

commented Jun 24, 2017

this is no duplicate.. the workaround doesn't work anymore

@Hotell

This comment has been minimized.

Copy link

commented Jun 27, 2017

@pkeuter

This comment has been minimized.

Copy link

commented Jun 29, 2017

It is a duplicate. The workaround doesn't work exactly as noted there anymore, but if you change uglify-js "^2.8.29" to uglify-js "^2.8.22". Everything is fine. Still an ugly workaround though.

@lili21

This comment has been minimized.

Copy link
Author

commented Jun 29, 2017

I don't get it.

@pkeuter

This comment has been minimized.

Copy link

commented Jun 29, 2017

uglify-js@^2.6, uglify-js@^2.8.22, "uglify-js@git://github.com/mishoo/UglifyJS2#harmony-v2.8.22":
  version "2.8.22"
  resolved "git://github.com/mishoo/UglifyJS2#278577f3cb75e72320564805ee91be63e5f9c806"
  dependencies:
    source-map "~0.5.1"
    yargs "~3.10.0"
  optionalDependencies:
    uglify-to-browserify "~1.0.0"

...

uglifyjs-webpack-plugin@^0.4.4, uglifyjs-webpack-plugin@^0.4.6:
  version "0.4.6"
  resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309"
  dependencies:
    source-map "^0.5.6"
    uglify-js "^2.8.22"
    webpack-sources "^1.0.1"
@lili21

This comment has been minimized.

Copy link
Author

commented Jun 29, 2017

That is the yarn.lock file. I won't say that is a workaround.

@pkeuter

This comment has been minimized.

Copy link

commented Jun 29, 2017

It is a workaround, because it works. This is the exact same workaround as posted in #32, with uglify-js "^2.8.22" modified from uglify-js "^2.8.29". Like I said. It's not pretty, but it works.

@lili21

This comment has been minimized.

Copy link
Author

commented Jun 29, 2017

There was a better workaround, just run the yarn add git://github.com/mishoo/UglifyJS2#harmony-v2.8.22 --dev command. which be mentioned in readme. But the 0.4.6 version broken this. that's why I create this issue.

@kurtextrem

This comment has been minimized.

Copy link

commented Jun 30, 2017

@pkeuter This is not about the regular versions, but about the harmony branch. If uglifyjs-webpack-plugin states regular 2.8.29 as dependency, npm doesn't care if you have the harmony branch as dependency set.

@pkeuter

This comment has been minimized.

Copy link

commented Jun 30, 2017

@kurtextrem I know this is about the harmony branch, but changing the yarn.lock file as mentioned before, will let this plugin use the older version of the harmony branch of UglifyJS. Again: it's not a brilliant "solution", but it fixes the build for me.

@michael-ciniawsky

This comment has been minimized.

Copy link
Member

commented Jul 4, 2017

Will be fixed by #63 soon, currently ES2015 minification isn't supported directly 😞

@kurtextrem

This comment has been minimized.

Copy link

commented Jul 4, 2017

The other question is, why is a patch version breaking things? Just by removing this line: https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/package.json#L54 this whole issue would be fixed again.

@michael-ciniawsky

This comment has been minimized.

Copy link
Member

commented Jul 4, 2017

@kurtextrem peerDependency broke webpack, bc of the missing uglify package, so just reverting wouldn't fix it

@mikesherov

This comment has been minimized.

Copy link

commented Jul 5, 2017

@kurtextrem also note that for <1.0.0, semver guarantees don't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.