This is a demo repo to reproduce the less loader issue
./node_modules/antd/es/button/style/index.less (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-7-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--6-oneOf-7-3!./node_modules/antd/es/button/style/index.less)
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? }
Workaround
$ yarn remove less-loader
// less-loader v6.0.0 is not working
$ yarn add less-loader@5.0.0
Reproduce Step
create repo by create-react-app
packages may need to install: babel-plugin-importcustomize-craless-loaderreact-app-rewired