Skip to content

Commit f70710a

Browse files
raixsumanthratna
authored andcommitted
Update PostCSS packages (facebook#10456)
1 parent fff235f commit f70710a

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

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

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

packages/react-scripts/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@
7070
"mini-css-extract-plugin": "0.11.3",
7171
"optimize-css-assets-webpack-plugin": "5.0.4",
7272
"pnp-webpack-plugin": "1.6.4",
73-
"postcss-flexbugs-fixes": "4.2.1",
74-
"postcss-loader": "3.0.0",
75-
"postcss-normalize": "8.0.1",
73+
"postcss": "8.2.4",
74+
"postcss-flexbugs-fixes": "5.0.2",
75+
"postcss-loader": "4.2.0",
76+
"postcss-normalize": "9.0.0",
7677
"postcss-preset-env": "6.7.0",
7778
"postcss-safe-parser": "5.0.2",
7879
"prompts": "2.4.0",

0 commit comments

Comments
 (0)