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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofbabel-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!