The less, configuration referenced in the react project reported an error and asked for help.

the newcomer, in the process of building according to the steps on the Internet, the following error occurred:

clipboard.png

paste the configuration file about less code:
/ / webpack.config.dev.js

{

        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
          }
        ],
      },
          
          

/ / webpack.config.prod.js

{
            // modify
            test: /\.(css|less)$/,
            loader: ExtractTextPlugin.extract(
              Object.assign(
                {
                  fallback: {
                    loader: require.resolve("style-loader"),
                    options: {
                      hmr: false,
                    },
                  },
                  use: [
                    {
                      loader: require.resolve("css-loader"),
                      options: {
                        importLoaders: 1,
                        minimize: true,
                        sourceMap: shouldUseSourceMap,
                      },
                    },
                    {
                      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",
                          }),
                        ],
                      },
                    },
                    {
                      //add
                      loader: require.resolve("less-loader"),
                    }
                  ],
                },
                extractTextPluginOptions
              )
            ),
            // Note: this won"t work without `new ExtractTextPlugin()` in `plugins`.
          }
         

/ / index.js

import React from "react";
import ReactDOM from "react-dom";
// import { Router } from "react-router-dom";
import CRouter from "./routers/routeMap";
import { AppContainer } from "react-hot-loader";
import { Provider } from "react-redux";
import { createStore } from "redux";
import registerServiceWorker from "./registerServiceWorker";
import SideCustom from "./containers/side/SiderCustom";
import HeadContain from "./containers/header/header";
import indexReducer from "./reducers/index";
import App from "./App";
import "antd/dist/antd.css";
import "./index.css";



is an error in the .babelrc file.

["import", { "libraryName": "antd", "style": true }]

style should be changed to true . Your style should be css.

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-1b374ec-2c078.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-1b374ec-2c078.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?