File tree Expand file tree Collapse file tree 1 file changed +31
-17
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +31
-17
lines changed Original file line number Diff line number Diff line change @@ -140,23 +140,37 @@ module.exports = function (webpackEnv) {
140140 // Necessary for external CSS imports to work
141141 // https://github.com/facebook/create-react-app/issues/2677
142142 ident : 'postcss' ,
143- plugins : [
144- 'postcss-flexbugs-fixes' ,
145- [
146- 'postcss-preset-env' ,
147- {
148- autoprefixer : {
149- flexbox : 'no-2009' ,
150- } ,
151- stage : 3 ,
152- } ,
153- ] ,
154- // Adds PostCSS Normalize as the reset css with default options,
155- // so that it honors browserslist config in package.json
156- // which in turn let's users customize the target behavior as per their needs.
157- 'postcss-normalize' ,
158- useTailwind && require ( 'tailwindcss' ) ,
159- ] ,
143+ config : false ,
144+ plugins : ! useTailwind
145+ ? [
146+ 'postcss-flexbugs-fixes' ,
147+ [
148+ 'postcss-preset-env' ,
149+ {
150+ autoprefixer : {
151+ flexbox : 'no-2009' ,
152+ } ,
153+ stage : 3 ,
154+ } ,
155+ ] ,
156+ // Adds PostCSS Normalize as the reset css with default options,
157+ // so that it honors browserslist config in package.json
158+ // which in turn let's users customize the target behavior as per their needs.
159+ 'postcss-normalize' ,
160+ ]
161+ : [
162+ 'tailwindcss' ,
163+ 'postcss-flexbugs-fixes' ,
164+ [
165+ 'postcss-preset-env' ,
166+ {
167+ autoprefixer : {
168+ flexbox : 'no-2009' ,
169+ } ,
170+ stage : 3 ,
171+ } ,
172+ ] ,
173+ ] ,
160174 } ,
161175 sourceMap : isEnvProduction ? shouldUseSourceMap : isEnvDevelopment ,
162176 } ,
You can’t perform that action at this time.
0 commit comments