-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Move browsers to cross-tool config #3644
Conversation
We need to confirm the effect this has on |
Only babel-preset-env 7.0 will support it. But we have several tools with Browserslist already. Should we enable it right now and on Babel 7 release it will be used for babel-preset-env,? |
@Timer how do you suggest to limit directory-up search? We need a really safe way since Browserslist is used in Autoprefixer (and it is the only recommended way to set browsers) with 10 M users :(. We can limit it with first directory with What limit is used in |
I'm not sure of the search depth, but we disable If directory up search limit would be an option, I'd imagine you'd provide a path to stop at as a configuration variable. |
@Timer yeap, we can read browserslist queries from some specific place. I can change PR for this behavior. What place will the best? |
Hmm, probably strictly |
Meh. I don't feel too strongly about upwards search here—doesn't seem that it will be as common a problem as Babel configs. |
Is this change backwards-compatible? What happens for existing users who don't have anything in |
I started a branch for 2.0, getting it in. This is a breaking change because existing projects will need to add |
Yeap, but not for Babel. @gaearon maybe we should explain it more clear in changelog? With a link to Browserslist docs. Not a first-time people asking. |
I'll add it to the final release documentation checklist. |
Hi. I moved browsers from Autoprefixer’s inner option to
browserslist
inpackage.json
.Reason
package.browserslist
as a way to set target browsers.package.browserslist
is used in many different tools. It is used byautoprefixer
,stylelint-no-unsupported-browser-features
,eslint-plugin-compat
,postcss-cssnext
,postcss-preset-env
,postcss-normalize
. The most important, this config will be used in nextbabel-preset-env
7.0.autoprefixer-info
CLI tool. This CLI tool is part ofautoprefixer
package, but didn’t work correctly without Browserslist config.Test
package.json
forbrowserslist
key.