Skip to content

Commit

Permalink
Loosen Babel preset to use browserslist (facebook#3770)
Browse files Browse the repository at this point in the history
* Provide better defaults

* Let babel determine features to compile

* meh

* Remove setting of BABEL_ENV

* Revert "Remove setting of BABEL_ENV"

This reverts commit ee2db70.

* Set browsers to ie9
  • Loading branch information
Timer committed Jan 15, 2018
1 parent 5a55208 commit 2bfa72c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ module.exports = function(
eject: 'react-scripts eject',
};

appPackage.browserslist = [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9',
];
appPackage.browserslist = {
development: ['chrome', 'firefox', 'edge'].map(
browser => `last 2 ${browser} versions`
),
production: ['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 11'],
};

fs.writeFileSync(
path.join(appPath, 'package.json'),
Expand Down

0 comments on commit 2bfa72c

Please sign in to comment.