Skip to content

Commit c9e1876

Browse files
authored
Lock babel configuration back to IE 9 support (ES5) (#5033)
1 parent e41c67d commit c9e1876

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/babel-preset-react-app/create.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,22 @@ module.exports = function(api, opts, env) {
4545
require('@babel/preset-env').default,
4646
{
4747
targets: {
48-
node: '6.12',
48+
node: 'current',
4949
},
5050
},
5151
],
5252
(isEnvProduction || isEnvDevelopment) && [
5353
// Latest stable ECMAScript features
5454
require('@babel/preset-env').default,
5555
{
56+
// We want Create React App to be IE 9 compatible until React itself
57+
// no longer works with IE 9
58+
targets: {
59+
ie: 9,
60+
},
61+
// Users cannot override this behavior because this Babel
62+
// configuration is highly tuned for ES5 support
63+
ignoreBrowserslistConfig: true,
5664
// `entry` transforms `@babel/polyfill` into individual requires for
5765
// the targeted browsers. This is safer than `usage` which performs
5866
// static code analysis to determine what's required.

0 commit comments

Comments
 (0)