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

Update uglifyjs-webpack-plugin to support prod builds with es6 target or higher #248

Closed
thetric opened this issue Feb 9, 2018 · 5 comments

Comments

@thetric
Copy link
Contributor

thetric commented Feb 9, 2018

The react-scripts package uses the UglifyJsPlugin version distributed by webpack (webpack.optimize.UglifyJsPlugin) which is quite old and doesn't support the minification of ES6 code (see here).
Since version 1.0.0 the plugin (now under a separate repo) uses a new uglify version that supports ES6 minification. Similar projects like angular-cli are already using it (angular/angular-cli#7610) or are planning to use it (create-react-app in 2.0.0) .

Simply replacing the old plugin with the new one would actually resolve #158 and #21 and bring ES6 prod builds! 🚀

@joshfarrant
Copy link

Thanks for this @thetric! Any info on when to expect a release?

DorianGrey pushed a commit that referenced this issue Feb 19, 2018
* feat(react-scripts/prod): use new uglifyJsPlugin for ES6 support

this closes #21, #158, #248

* feat(react-scripts/prod): execute uglify plugin parallel + enable caching
@thetric
Copy link
Contributor Author

thetric commented Feb 19, 2018

Closed in 39d6c62

@thetric thetric closed this as completed Feb 19, 2018
@0x6a74
Copy link

0x6a74 commented Mar 2, 2018

could this be publish?

@hellraisercenobit
Copy link

Error is back with latest v6 and es2015 target

`
yarn ng s --prod

Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor`

@thetric
Copy link
Contributor Author

thetric commented May 15, 2018

Looks like an Angular CLI issue. I guess you have mixed up the repos: angular/angular-cli#7799 (comment)

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