问题:
1 2 3 4 5 6 |
Failed to compile ./src/views/demo/style/index.module.less (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-8-3!./node_modules/_less-loader@6.2.0@less-loader/dist/cjs.js??ref--6-oneOf-8-4!./src/views/demo/style/index.module.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 'localIdentName'. These properties are valid: object { lessOptions?, prependData?, appendData?, sourceMap?, implementation? } This error occurred during the build time and cannot be dismissed. |
解决:
卸载less-loader,安装less-loader@5.0.0
1 2 |
yarn remove less-loader yarn add less-loader@5.0.0 |