From 64fe862d0fdfcad68cccc970847c0e32f586ecdd Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Wed, 10 Jan 2018 02:39:13 +1000 Subject: [PATCH] Move browsers to cross-tool config (#3644) --- packages/react-scripts/config/webpack.config.dev.js | 6 ------ packages/react-scripts/config/webpack.config.prod.js | 6 ------ packages/react-scripts/scripts/init.js | 7 +++++++ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 9f3131b0660..843ec0dd318 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -200,12 +200,6 @@ module.exports = { plugins: () => [ require('postcss-flexbugs-fixes'), autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], flexbox: 'no-2009', }), ], diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 3b2a2068db2..8141bd31c17 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -221,12 +221,6 @@ module.exports = { plugins: () => [ require('postcss-flexbugs-fixes'), autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ], flexbox: 'no-2009', }), ], diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index b283bad6ee6..27b214e6431 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -43,6 +43,13 @@ module.exports = function( eject: 'react-scripts eject', }; + appPackage.browserslist = [ + '>1%', + 'last 4 versions', + 'Firefox ESR', + 'not ie < 9', + ]; + fs.writeFileSync( path.join(appPath, 'package.json'), JSON.stringify(appPackage, null, 2)