addLessLoader does not work with css-loader ^3.0.0
See original GitHub issueSo with css-loader version 3+, the option localIdentName
is no longer supported, and the modules
option has become an object that can contain the localIdentName
option.
This causes addLessLoader to error if using this version of css-loader because the old localIdentName
option is still being given:
{
test: lessModuleRegex,
use: getLessLoader({
importLoaders: 2,
modules: true,
localIdentName: localIdentName
})
}
You can see the change described above here: https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#breaking-changes
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
less-loader - npm
A Less loader for webpack. Compiles Less to CSS.. Latest version: 11.1.0, last published: 3 months ago. Start using less-loader in your ...
Read more >webpack style loader and css loader not working for simple ...
I attempting to follow the tutorial here https://webpack.js.org/guides/asset-management/ however I can never get the css file to load.
Read more >less-loader | Yarn - Package Manager
A Less loader for webpack. Compiles Less to CSS. webpack, loader, less, lesscss. readme ... Use it. $ yarn add less-loader. copy. Try...
Read more >options has an unknown property 'localidentname'. these ...
Syntax of css-loader options has changed in version 3.0.0. localIdentName was moved under modules option. I don't know why option importLoaders is returning ......
Read more >Rails 6 + webpacker + yarn + Fancytree + LESS | Kiril Mitov blog
yarn add less; yarn add less-loader; Add less-loader to webpack environment. Use fancytree. NOTE – import is kind of not working.
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
Now create-react-app is still using css-loader@2.1.1, need to wait for it to upgrade dependencies.
Hi @kunjiang, I’m going to close this in favor of #201. Please continue conversation there!