Skip to content

Commit

Permalink
Move browsers to cross-tool config (#3644)
Browse files Browse the repository at this point in the history
  • Loading branch information
ai authored and gaearon committed Jan 14, 2018
1 parent c36414e commit 113b722
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
6 changes: 0 additions & 6 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
],
Expand Down
6 changes: 0 additions & 6 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,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',
}),
],
Expand Down
7 changes: 7 additions & 0 deletions packages/react-scripts/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 113b722

Please sign in to comment.