Mengxin doesn't understand webpack include, asking for help.

problem description

I am new to webpack. When I used antd, to package the project, I found that I needed loader, for less, so I added less-loader, to the webpack configuration as follows

            {
                test: /\.less$/,
                use: [
                    "style-loader",
                    "css-loader",
                    {
                        loader: "less-loader",
                        options: {
                            javascriptEnabled: true
                        }
                    }
                ]
            }

later I thought that I only needed to parse the less file under antd, so I added the include entry as follows

            {
                test: /\.less$/,
                include: path.resolve(__dirname, "/node_modules/antd"),
                use: [
                    "style-loader",
                    "css-loader",
                    {
                        loader: "less-loader",
                        options: {
                            javascriptEnabled: true
                        }
                    }
                ]
            }

the result is wrong, as follows

clipboard.png
as a newcomer, I look confused. Isn"t that how include uses it?

Mar.17,2022

path.resolve (_ _ dirname, 'node_modules/antd')

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