-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Preset Default: Configure @babel/preset-env preset to respect a local Browserslist configuration #31898
Babel Preset Default: Configure @babel/preset-env preset to respect a local Browserslist configuration #31898
Conversation
Size Change: +156 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it yet but it looks good. I hope we merge it today 👍🏻
c01d303
to
9898955
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, let's get this in to have it included in Gutenberg 5.7. I can test later.
49ddc49
to
315e1ba
Compare
In fact, it's going to be useful for Gutenberg itself because it will finally use the top-level config :) https://github.com/WordPress/gutenberg/blob/trunk/.browserslistrc I tested locally and it loads it correctly now 👍🏻 |
Description
This uses browserslist.findConfig() to first search for a local config before falling back to
@wordpress/browserslist-config
.Fixes #31857.
How has this been tested?
To verify what targets are used you can set
opts.debug = true
after line 37Before:
After (with
@wearerequired/browserslist-config
):Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).