Skip to content

Switch to uglifyjs-webpack-plugin #128

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

Merged

Conversation

sudo-suhas
Copy link
Contributor

Summary

This switches to uglifyjs-webpack-plugin which uses UglifyJS v3 (uglify-es) to minify JavaScript.

Why is this required

Right now, we use babel-preset-env with some browser versions as the target. This dynamic config may break minification because currently the uglify plugin shipped in webpack 3 doesn't support ES6+. For example, if I change my target.browsers to ["last 2 Chrome versions", "last 2 Firefox versions"] it will break uglify. Since this template is meant to be customised by developers, it would be better to have a more robust method for minification.

Also see discussion in #44.

Note: This PR is a clone of vuejs-templates/webpack#1119(merged)

This plugin uses UglifyJS v3 (`uglify-es`) to minify JavaScript. It can be used
to minify ES6.
@jeffposnick
Copy link
Collaborator

Great—thanks for getting this merged into the webpack template first!

@jeffposnick jeffposnick merged commit 694af84 into vuejs-templates:development Dec 4, 2017
@sudo-suhas sudo-suhas deleted the uglifyjs-plugin branch December 4, 2017 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants