question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

addLessLoader does not work with css-loader ^3.0.0

See original GitHub issue

So 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
onlylingcommented, Aug 15, 2019

Now create-react-app is still using css-loader@2.1.1, need to wait for it to upgrade dependencies.

0reactions
with-heartcommented, Dec 15, 2019

Hi @kunjiang, I’m going to close this in favor of #201. Please continue conversation there!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found