customize-cra
customize-cra copied to clipboard
[Bug] `addLessLoader` throw error with newest `css-loader`
Newest css-loader
validate the options of css-loader
.
And support new usage with css modules.
react-scripts has depended on [email protected]
Use the addLessLoader
newest react-scripts
will throw error:
ValidationError: Invalid options object. CSS 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 { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals?, esModule? }
So, we need rewrite these line to support newest css-loader
options.
https://github.com/arackaf/customize-cra/blob/89690d738ffed10d2d7d8c236798c97959615df3/src/customizers/webpack.js#L131-L132
https://github.com/arackaf/customize-cra/blob/89690d738ffed10d2d7d8c236798c97959615df3/src/customizers/webpack.js#L193-L194