Skip to content

Commit

Permalink
Lock babel configuration back to IE 9 support (ES5) (facebook#5033)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Sep 19, 2018
1 parent e41c67d commit c9e1876
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@ module.exports = function(api, opts, env) {
require('@babel/preset-env').default,
{
targets: {
node: '6.12',
node: 'current',
},
},
],
(isEnvProduction || isEnvDevelopment) && [
// Latest stable ECMAScript features
require('@babel/preset-env').default,
{
// We want Create React App to be IE 9 compatible until React itself
// no longer works with IE 9
targets: {
ie: 9,
},
// Users cannot override this behavior because this Babel
// configuration is highly tuned for ES5 support
ignoreBrowserslistConfig: true,
// `entry` transforms `@babel/polyfill` into individual requires for
// the targeted browsers. This is safer than `usage` which performs
// static code analysis to determine what's required.
Expand Down

0 comments on commit c9e1876

Please sign in to comment.