localIdent cause an error during build with css-modules
See original GitHub issueI followed this article to setup a create react app project with less loader
and css modules
. And once you try to actually import a less file, for exemple:
import styles from "./App.module.less";
it causes the following error during build (with yarn start):
s-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--6-oneOf-8-3!./src/App.module.less
)
ValidationError: Invalid options object. CSS Loader has been initialized using an options object tha
t does not match the API schema.
- options has an unknown property 'localIdentName'. These properties are valid:
object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals?, esM
odule? }
is there a way to override the settings causing this without actually changing the lib ?
Edit: I tested removing localIdentName
and it works. Although I’m sure it’s there for some reason.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:13
Top Results From Across the Web
Error while configuring CSS modules with webpack
Syntax of css-loader options has changed in version 3.0.0. localIdentName was moved under modules option.
Read more >options has an unknown property 'localidentname'. these ...
v2.2.2 --> h5 编译 开启 cssModules 报 options has an unknown property 'localIdentName' ... it causes the following error during build (with yarn...
Read more >CSS Modules and React
In this final post of our series on CSS Modules, I'll be taking a look at how to make a static React site...
Read more >css-loader | webpack - JS.ORG
Allows auto enable CSS modules/ICSS based on filename when modules option is object. Possible values: undefined - enable CSS modules for all files....
Read more >babel-plugin-react-css-modules - Bountysource
I use the plugin postcss-scss together with sass-loader in Webpack 4. It works if the css class names are global and i use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Anish-Agnihotri if it’s alright with you I will close the issue ?
Alright I will test that tomorrow (actually later today, it’s 3am here).