Skip to content

Commit 7b56cf7

Browse files
authored
Update PostCSS packages (#10456)
1 parent 3c02ca7 commit 7b56cf7

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

packages/react-scripts/package.json

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

0 commit comments

Comments
 (0)