babel-preset-env: Including 'android' browser when not in browserslist config #10945
Labels
i: bug
i: needs triage
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current Behavior
Upgrading from
babel-preset-env
(and other babel libraries) from 7.7.4 to 7.7.5 starts including too many transformations. PR here - this adds 10% size to our app. DestinyItemManager/DIM#4814Our babel config: https://github.com/DestinyItemManager/DIM/blob/master/babel.config.js
Our browserslist config is:
Using 7.7.4, debug ouput:
Using 7.7.5, debug ouput:
Input Code
DestinyItemManager/DIM#4814
Our babel config: https://github.com/DestinyItemManager/DIM/blob/master/babel.config.js
Expected behavior/code
I would expect that the transforms wouldn't change between versions, especially minor versions, and that we'd continue only transpiling what's necessary for the browsers in our browserslist config.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
Possible Solution
It appears that the issue is that babel-preset-env now considers
android: 79
to be one of the browsers on our list, and is including transforms for it as a result (and thus including most of the es5 translations). I'm not sure why it's doing this - runningnpx browserslist
gives me:Perhaps whatever mapping there is between browserslist and preset-env is misidentifying the android bits of the config. What's weird is the android-specific browsers in that list aren't at version 79 - only Chrome is.
The text was updated successfully, but these errors were encountered: