Last active
December 5, 2023 22:18
-
-
Save mogelbrod/3bebd3678618b24566772586e52638e6 to your computer and use it in GitHub Desktop.
Prevent core-js polyfills of APIs that should be supported by IE11 for general use (incomplete list)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
presets: [ | |
['@babel/preset-env', { | |
useBuiltIns: 'usage', | |
debug: false, | |
loose: true, | |
corejs: { | |
version: 3, | |
proposals: true, | |
}, | |
// Exclude polyfills for features whose main usage is supported in IE11 | |
// see https://caniuse.com/?serach=[query] for support data | |
exclude: [ | |
'es.array.concat', | |
'es.array.join', | |
'es.array.slice', | |
'es.number.*', // as long as you use the global functions instead (parseInt, parseFloat, isNaN, etc.) | |
'es.object.keys', | |
'es.object.to-string', | |
'es.regexp.to-string', | |
'es.string.match', // as long as you don't use newer regex modifiers or syntax | |
'es.string.replace', // as long as you don't use newer regex modifiers or syntax | |
'es.string.split', // as long as you don't use newer regex modifiers or syntax | |
], | |
}], | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment