@babel/preset-env doesn't work with default in browserslistrc #10867
Labels
i: bug
i: duplicate
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current Behavior
If relying on external browserslist config, "defaults" in that file resolves to empty set, which enables all transforms.
Expected behavior/code
"defaults" should resolve normally. In the example below, many transforms should be disabled.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
.browserslistrc
Environment
Additional context/Screenshots
This is broken because of legacy support:
babel/packages/babel-preset-env/src/targets-parser.js
Lines 205 to 214 in bffa415
This causes defaults to be empty (since
!hasTargets
) and thus the result is empty. 😢The text was updated successfully, but these errors were encountered: