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 [email protected]
Reproduce Step
create repo by create-react-app
packages may need to install: babel-plugin-importcustomize-craless-loaderreact-app-rewired
Failed to compile.
./node_modules/antd/es/date-picker/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/date-picker/style/index.less)
// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
in /app/node_modules/antd/es/style/color/bezierEasing.less (line 110, column 0)