Skip to content

Commit eca84f4

Browse files
raixakxcv
authored andcommitted
Update PostCSS packages (facebook#10456)
1 parent e39e831 commit eca84f4

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

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

+19-17
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,25 @@ module.exports = function (webpackEnv) {
127127
// package.json
128128
loader: require.resolve('postcss-loader'),
129129
options: {
130-
// Necessary for external CSS imports to work
131-
// https://github.com/facebook/create-react-app/issues/2677
132-
ident: 'postcss',
133-
plugins: () => [
134-
require('postcss-flexbugs-fixes'),
135-
require('postcss-preset-env')({
136-
autoprefixer: {
137-
flexbox: 'no-2009',
138-
},
139-
stage: 3,
140-
}),
141-
// Adds PostCSS Normalize as the reset css with default options,
142-
// so that it honors browserslist config in package.json
143-
// which in turn let's users customize the target behavior as per their needs.
144-
postcssNormalize(),
145-
],
146-
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
130+
postcssOptions: {
131+
plugins: [
132+
require('postcss-flexbugs-fixes'),
133+
[
134+
require('postcss-preset-env'),
135+
{
136+
autoprefixer: {
137+
flexbox: 'no-2009',
138+
},
139+
stage: 3,
140+
},
141+
],
142+
// Adds PostCSS Normalize as the reset css with default options,
143+
// so that it honors browserslist config in package.json
144+
// which in turn let's users customize the target behavior as per their needs.
145+
postcssNormalize(),
146+
],
147+
},
148+
sourceMap: isEnvProduction && shouldUseSourceMap,
147149
},
148150
},
149151
].filter(Boolean);

packages/react-scripts/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@
6666
"mini-css-extract-plugin": "0.11.3",
6767
"optimize-css-assets-webpack-plugin": "5.0.4",
6868
"pnp-webpack-plugin": "1.6.4",
69-
"postcss-flexbugs-fixes": "4.2.1",
70-
"postcss-loader": "3.0.0",
71-
"postcss-normalize": "8.0.1",
69+
"postcss": "8.2.4",
70+
"postcss-flexbugs-fixes": "5.0.2",
71+
"postcss-loader": "4.2.0",
72+
"postcss-normalize": "9.0.0",
7273
"postcss-preset-env": "6.7.0",
7374
"postcss-safe-parser": "5.0.2",
7475
"prompts": "2.4.0",

0 commit comments

Comments
 (0)