在使用react时按需引入antd时,报了下面这个错:
ValidationError: Invalid options object. Less Loader has been initialized using an options object that does not match the API schema.
options has an unknown property ‘source’. These properties are valid:
object { lessOptions?, prependData?, appendData?, sourceMap? }
在网上查找到一个解决方法:
先移除项目中的less-loader,然后安装一个5.0.0的
解决问题的网址:https://github.com/ant-design/ant-design/issues/23624