Error with latest version of less-loader
iloveip opened this issue · comments
Svetlana Malakhova commented
Hi there,
I would like to use nwb with antd, but I get an error:
ERROR in ./node_modules/antd/es/select/style/index.less)
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
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 'javascriptEnabled'. These properties are valid:
object { lessOptions?, prependData?, appendData?, sourceMap?, implementation? }
...
I guess it has something to do with the latest version of less-loader. Please see more info here ant-design/ant-design#23624, less-loader should be initialized with lessOptions
:
lessOptions: {
javascriptEnabled: true,
modifyVars: { '@primary-color': '#1DA57A' },
},
How can I fix this error?