-
Notifications
You must be signed in to change notification settings - Fork 508
Configure targets.browser for babel-preset-env #44
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
Configure targets.browser for babel-preset-env #44
Conversation
Thanks! |
Thank you! |
Nice! |
Could we please merge this in? Are there any changes required? |
The problem is this dynamic config may break minification because currently the uglify plugin shipped in webpack 2 doesn't support ES6+. It seems the standalone uglify webpack plugin just got a 1.0-beta release that uses the ES-compatible version of uglify, but I'm not sure if it works with webpack 2.
|
We could either set |
With the browserlist config as
This works just fine with the default webpack uglify plugin. But this could change in the future as the targeted browsers could change. Just for testing, I changed my I tried out
I tried playing around with the config options but couldn't reduce the generated file size. Then I tried out Also, correct me if I am wrong here @yavorsky but setting |
91a9b4d
to
a10c881
Compare
@sudo-suhas did this change land upstream? I see some specific concerns from Evan above but imagine that we'll want to stay consistent with the build pipeline changes in the Webpack template regardless. |
Yes, it was merged in the webpack template - vuejs-templates/webpack#763 |
Thanks. With that in mind, let's land this one. |
Hopefully, when this is upgraded to webpack 3, we can also setup |
Configures
babel-preset-env
to target browsers usingbrowserslist
.babel-preset-env
does not yet consume thebrowserslist
config inpackage.json
. There is a PR open for adding this support. We can avoid the duplicated config(package.json
,.babelrc
) once this PR is merged intobabel-preset-env
.This issue was discussed here - vuejs-templates/webpack#762