After configuring less in create-react-app, antd reported an error?

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)
Mar.01,2021

less what is the version? 3.0.0 add one more option to the configuration javascriptEnabled: true . For this kind of question, take a look at issue above github much faster than you asked.


less-loader does not support that attribute css and less (webpackconfig) write separately,


https://github.com/ZhangLynn/.


how did you solve the problem in the end? I can't add jaascriptEnabled to it.


@ Qingzhan is the version of less-loader, don't wear it askew

{
  loader: require.resolve('less-loader'),
  options: {
    javascriptEnabled: true
  }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9aa11-17f0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9aa11-17f0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?