babel-runtime and babel-polyfill should have option to not polyfill ES5 functionality (T7517) #4417
Labels
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug information
Options
.babelrc:
Input code
Description
The output code here is:
babel-polyfill
pulls in this polyfill as well, but it's harder to demonstrate.Given that Babel assumes that code will run in an ES5 environment, it seems incorrect to ship polyfills for ES5 functionality by default.
This also applies somewhat to e.g. the much more commonly used
Object.keys
, where the difference between ES5 and ES2015 is relatively minor and unlikely to come up in practice.The text was updated successfully, but these errors were encountered: