Skip to content

Commit 7f121e3

Browse files
aigaearon
authored andcommitted
Move browsers to cross-tool config (facebook#3644)
1 parent cac8be1 commit 7f121e3

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Diff for: 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
],

Diff for: packages/react-scripts/config/webpack.config.prod.js

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

Diff for: 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)