recently, I was learning to use create-react-app scaffolding in antd,. According to the configuration of less, on the Internet, but after start, ant reported an error.
webpack.configi.dev configuration Code
{
test: /\.(css|less)$/,
use: [
require.resolve("style-loader"),
{
loader: require.resolve("css-loader"),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve("postcss-loader"),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: "postcss",
plugins: () => [
require("postcss-flexbugs-fixes"),
autoprefixer({
browsers: [
">1%",
"last 4 versions",
"Firefox ESR",
"not ie < 9", // React doesn"t support IE8 anyway
],
flexbox: "no-2009",
}),
],
},
},
{
loader: require.resolve("less-loader") // compiles Less to CSS
}
],
},
error message
./node_modules/antd/dist/antd.css
Module build failed:
/* autoprefixer: off */
filter: progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false);
Unrecognised input
in /Users/heliu/Desktop/ant-echarts/node_modules/antd/dist/antd.css (line 15367, column 16)