Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

feat: allow to specify environments to support with new envTargets option #9

Merged
merged 3 commits into from
Sep 4, 2017

Conversation

sullivanpt
Copy link
Contributor

Given the primary feature of babel-preset-env is "a Babel preset that can automatically determine the Babel plugins and polyfills you need based on your supported environments," it makes sense to me to be able to adjust the targeted environments of babel-preset-vue-app to something newer than ES5.

This PR exposes the targets as an option in this preset, so we can do things like disable async transformations if we want to use the native browser support for such features.

One aspect of this PR that I am on the fence about is whether or not the new option should also override the targets when env is "test", as the original implementation has a special case here. I've opted to be conservative and leave the special "test" case in place. Please let me know if you want it otherwise.

Thanks!

@@ -5,7 +5,7 @@
## Features

- Latest ECMAScript features (babel-preset-env)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this white space change, VSCode was overzealous. :-(

@yyx990803 yyx990803 requested a review from egoist September 4, 2017 01:18
@yyx990803
Copy link
Member

@egoist LGTM

@egoist
Copy link
Collaborator

egoist commented Sep 4, 2017

what about simply targets 😅

@sullivanpt
Copy link
Contributor Author

sullivanpt commented Sep 4, 2017 via email

@sullivanpt
Copy link
Contributor Author

The option has been renamed targets. Thanks again for all the great work around vuejs, love it!

@egoist egoist merged commit 73916f3 into vuejs:master Sep 4, 2017
@sullivanpt sullivanpt deleted the env-targets branch September 4, 2017 15:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants