Skip to content

Commit 7b9b36f

Browse files
aiTimer
authored andcommitted
Move browsers to cross-tool config (facebook#3644)
1 parent a0fc935 commit 7b9b36f

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

packages/react-scripts/config/webpack.config.dev.js

-6
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ module.exports = {
200200
plugins: () => [
201201
require('postcss-flexbugs-fixes'),
202202
autoprefixer({
203-
browsers: [
204-
'>1%',
205-
'last 4 versions',
206-
'Firefox ESR',
207-
'not ie < 9', // React doesn't support IE8 anyway
208-
],
209203
flexbox: 'no-2009',
210204
}),
211205
],

packages/react-scripts/config/webpack.config.prod.js

-6
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,6 @@ module.exports = {
222222
plugins: () => [
223223
require('postcss-flexbugs-fixes'),
224224
autoprefixer({
225-
browsers: [
226-
'>1%',
227-
'last 4 versions',
228-
'Firefox ESR',
229-
'not ie < 9', // React doesn't support IE8 anyway
230-
],
231225
flexbox: 'no-2009',
232226
}),
233227
],

packages/react-scripts/scripts/init.js

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ module.exports = function(
4343
eject: 'react-scripts eject',
4444
};
4545

46+
appPackage.browserslist = [
47+
'>1%',
48+
'last 4 versions',
49+
'Firefox ESR',
50+
'not ie < 9',
51+
];
52+
4653
fs.writeFileSync(
4754
path.join(appPath, 'package.json'),
4855
JSON.stringify(appPackage, null, 2)

0 commit comments

Comments
 (0)