The antd component uses less to report an error, how to use it?

babel-plugin-importlessless-loader
import antdlesscss

create-react-appnpm eject:
1.package.jsonbabel-plugin-import
clipboard.png

2.webpack.config.dev.jsless:

clipboard.png

clipboard.png

is that you can"t use less, in antd. I really don"t know what"s wrong with it.

Mar.09,2021

antd uses less3.X+,webpack to add the following configuration:
{loader: 'less-loader', options: {javascriptEnabled: true}}


paste the configuration of webpack to see

Menu