Skip to content
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

@babel/present-env and no targets improvements #2489

Open
thernstig opened this issue Apr 13, 2021 · 1 comment
Open

@babel/present-env and no targets improvements #2489

thernstig opened this issue Apr 13, 2021 · 1 comment

Comments

@thernstig
Copy link
Contributor

Hi!

I have read https://babeljs.io/docs/en/babel-preset-env#no-targets and think I've gotten the gist of it, but I believe the docs are unclear. I will try to point out why:

  1. The below quote (and the preceding text) it not correct if you have a browserlist config such as .browserlistrc. I feel this text could be made more clear. The subsequent does make it slightly more clear. But I believe the section could be made much more intuitive by starting stating "If you have no browserlist config sources specified..."

We don't recommend using preset-env this way because it doesn't take advantage of its ability to target specific environments/versions.

  1. The below quote states "either explicitly", then I do not see a reason to check the "No targets" section.

Please note that if you are relying on browserslist's defaults query (either explicitly or by having no browserslist config), you will want to check out the No targets section for information on preset-env's behavior.

@babel-bot
Copy link
Contributor

Hey @thernstig! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

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

No branches or pull requests

2 participants