[Feature Request] How about add postcssRegex in webpack config?
Created by: SoYoung210
Is your proposal related to a problem?
(Write your answer here.) Yes. When i want to use postcss(pcss), i have to override it.
const cssRule = oneOfRule.oneOf.find(rule => rule.test && rule.test.toString().includes('css'));
cssRule.test = /\.p?css$/;
How about add postcssRegex? (like sass and sassModule)
Describe the solution you'd like
packages/react-scripts/config/webpack.config.js
// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
const sassRegex = /\.(scss|sass)$/;
const sassModuleRegex = /\.module\.(scss|sass)$/;
const postcssRegex = /\.p?css$/;
...
{
test: postcssRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
},
'postcss-loader'
)
},
Describe alternatives you've considered
Each user override config.. may be with eject.
Additional context
(Write your answer here.)