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

New dependency name: uglify-es => terser #1 #298

Closed
fabiosantoscode opened this issue May 17, 2018 · 17 comments
Closed

New dependency name: uglify-es => terser #1 #298

fabiosantoscode opened this issue May 17, 2018 · 17 comments

Comments

@fabiosantoscode
Copy link

There has been development on a new fork of uglify-es, which is now called terser and has its own package!

"terser": "^3.7.3"

Please upgrade to our new version.

@Nantris
Copy link

Nantris commented Jun 9, 2018

Is there a plan to do this? I've not been able to build using the primary fork of uglifyjs-webpack-plugin for over 5 months now.

All issues I've commented on, I've heard nothing from any maintainers.

The version of uglify-es used in this plugin has been broken for many, many months.

@fabiosantoscode
Copy link
Author

@slapbox we haven't ported any issues to the terser repository. Can you link to what issues affect you?

@Nantris
Copy link

Nantris commented Jun 10, 2018

Sorry, by "this plugin" I mean the uglifyjs-webpack-plugin

The issue I'm having is this one, sym.definition is not a function #228

I'm not able to recall the exact nature of the issue, but I know the only solution I've found is to overwrite node_modules\uglifyjs-webpack-plugin\node_modules\es-uglify that installs by default with uglify-es@3.3.4

It looks like the plugin uses this version by default again, but nonetheless, I need to follow the procedure outlined above. Not sure about the exact cause anymore. I have cleared my yarn cache, but the issue persists.

@fabiosantoscode
Copy link
Author

That issue should be fixed in terser. It has been closed in February in uglify-es.

@Nantris
Copy link

Nantris commented Jun 10, 2018

Indeed it has. For a while uglifyjs-webpack-plugin was using problematic versions of uglify-es like 3.10.x if I recall. I'm unsure why this issue is persisting since they've since rolled back to 3.3.4.

@olsonpm
Copy link

olsonpm commented Jun 15, 2018

I'm having various issues with uglify-es via this plugin and will try terser. I appreciate you raising this issue. However it seems a new plugin may be appropriate given the name change? i.e. terser-webpack-plugin heh.

@olsonpm
Copy link

olsonpm commented Jun 15, 2018

fyi I got the initial uglify -> terser refactoring done on a fork I'm using for my personal project. It works on my project so far - I'll update it if I run into any issues.

@alexander-akait
Copy link
Member

Plan:

  1. Finish and merge https://github.com/webpack-contrib/uglifyjs-webpack-plugin/pull/304ю
  2. Implement support custom minify function (add tests and documentation about how use plugin with uglify-js and uglify-es)
  3. Bump minimum required nodejs version, update all deps, switch to terser by default and release 2 version.
  4. Bump this in webpack.

Any help is welcome.

@mgol
Copy link

mgol commented Jun 16, 2018 via email

@olsonpm
Copy link

olsonpm commented Jun 19, 2018

@mgol - I just now saw this conversation regarding the name change. Seems they are going to keep it as is which is reasonable enough.

@kzc
Copy link

kzc commented Jun 21, 2018

It doesn’t seem fair
for the UglifyJS project to use its name in the package when it no longer
has anything to do with it. It may also wrobiły direct people experiencing
minification issues to UglifyJS

That's a valid concern.

Although if this plugin allowed the swapping out of require("terser").minify for another uglify-compatible minify function like require("uglify-js").minify - or even a custom minify function - then this project's npm name would make more sense.

@kzc
Copy link

kzc commented Jun 21, 2018

Worth mentioning that yarn users can replace uglify-es with terser without modifying this plugin or your webpack config:

https://github.com/fabiosantoscode/terser#replacing-uglify-es-with-terser-in-a-project-using-yarn

@Nantris
Copy link

Nantris commented Jun 21, 2018

@kzc, that is a crazy useful feature to know about. Thank you

@kzc
Copy link

kzc commented Jun 21, 2018

that is a crazy useful feature to know about

Yeah, no kidding. It's not documented very well in yarn. I found it by trial and error. Can also peg the module replacement to a specific version.

@alexander-akait
Copy link
Member

Close in favor https://github.com/webpack-contrib/terser-webpack-plugin, feel free to feedback and create new issues

@styfle
Copy link

styfle commented Aug 2, 2018

@evilebottnawi Is terser-webpack-plugin published to npm yet?

@alexander-akait
Copy link
Member

@styfle today will be published

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

No branches or pull requests

8 participants