css-loaderで「options has an unknown property ‘getLocalIdent’. These properties are valid:」のエラー
エラー内容
css-loaderのバージョンを上げた際に下記エラーが表示されました。
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 'getLocalIdent'. These properties are valid:
object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals?, esModule? }
解決策
getLocalIdentをmodules配下に移動します。
変更前
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
変更後
modules: {
getLocalIdent: getCSSModuleLocalIdent
},
ディスカッション
コメント一覧
まだ、コメントがありません