-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Docs: Specify @babel/present-env relations to common browsers such as Opera Mini #2482
Comments
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." |
https://babeljs.io/docs/en/babel-preset-env#ineffective-browserslist-queries We have a caveat section about Opera Mini and it applies to other browsers which do not have support data. |
Hey @thernstig! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
@JLHwung thanks, I had not seen that one. As you mention, there are a lot of other browsers shown when doing But what does this mean then? That section does not make it clear for me. Will it as I suspect transpile all my code to use all plugins listed in https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json ? Or what does "ignore" in that text actually mean? |
"ignore" means that we specifying it has the same effect as not specifying it, we can try making the wording clearer on the website. We could also explicitly write the list of "not ignored" browsers, which is basically the intersection of what |
Thanks @nicolo-ribaudo - but it makes sense. I do think it would be a good thing to add more documentation about this, as there are quite many browsers that |
Feature Request
Is your feature request related to a problem?
https://babeljs.io/docs/en/babel-preset-env#how-does-it-work states that it follows https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json to know what plugins to pass to transpile code. https://babeljs.io/docs/en/babel-preset-env#browserslist-integration also recommends to use browerlist to specify targets.
But browserlist best practices https://github.com/browserslist/browserslist#best-practices states:
It is thus confusing reading https://github.com/babel/babel/blob/master/packages/babel-compat-data/data/plugins.json and not seeing those browser there. Because if I run
npx browserslist
withdefaults
specified in.browserlistrc
, I see many browsers (such as Opera Mini) not included in theplugins.json
file. This means I assume it uses all plugins to transform my code.Describe the solution you'd like
I would like the docs to be clear here how it works for all common browsers not listed in
plugins.json
. The current text makes it sound like all my code will use all plugins.The text was updated successfully, but these errors were encountered: