Skip to content

Commit 044e57b

Browse files
cr101gaearon
authored andcommitted
Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autoprefixer (#1771)
* Adding postcss-flexbugs-fixes Using postcss-flexbugs-fixes to fix all flexbug's issues. * Adding flexbox: 'no-2009' to Autoprefixer It will add flexbox prefixes only for final and IE versions of specification.
1 parent 9b231d4 commit 044e57b

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,15 @@ module.exports = {
197197
options: {
198198
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
199199
plugins: () => [
200+
require('postcss-flexbugs-fixes'),
200201
autoprefixer({
201202
browsers: [
202203
'>1%',
203204
'last 4 versions',
204205
'Firefox ESR',
205206
'not ie < 9', // React doesn't support IE8 anyway
206207
],
208+
flexbox: 'no-2009',
207209
}),
208210
],
209211
},

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

+2
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,15 @@ module.exports = {
202202
options: {
203203
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
204204
plugins: () => [
205+
require('postcss-flexbugs-fixes'),
205206
autoprefixer({
206207
browsers: [
207208
'>1%',
208209
'last 4 versions',
209210
'Firefox ESR',
210211
'not ie < 9', // React doesn't support IE8 anyway
211212
],
213+
flexbox: 'no-2009',
212214
}),
213215
],
214216
},

packages/react-scripts/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"inquirer": "3.0.6",
5252
"jest": "19.0.2",
5353
"object-assign": "4.1.1",
54+
"postcss-flexbugs-fixes": "2.1.0",
5455
"postcss-loader": "1.3.3",
5556
"promise": "7.1.1",
5657
"react-dev-utils": "^0.5.2",

0 commit comments

Comments
 (0)