Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addLessLoader does not work with css-loader ^3.0.0 #134

Closed
m-weeks opened this issue Jul 19, 2019 · 7 comments
Closed

addLessLoader does not work with css-loader ^3.0.0 #134

m-weeks opened this issue Jul 19, 2019 · 7 comments
Labels
🧨 breaking change Require a major breaking release to implement.
Milestone

Comments

@m-weeks
Copy link

m-weeks commented Jul 19, 2019

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

@FezVrasta FezVrasta added the 🐛 bug Something isn't working label Jul 19, 2019
@with-heart with-heart added the 🧨 breaking change Require a major breaking release to implement. label Aug 3, 2019
@with-heart with-heart added this to the 1.0 milestone Aug 3, 2019
@with-heart
Copy link
Collaborator

Hi @m-weeks, sorry for taking so long to get back to you. I've added you to the project's contributors for reporting this issue. Thanks for helping out!

I've added this to the 1.0 milestone as this would require a breaking change on our end.

This is related to #138.

@onlyling
Copy link
Contributor

Now create-react-app is still using [email protected], need to wait for it to upgrade dependencies.

@with-heart
Copy link
Collaborator

@onlyling Good catch.

@with-heart with-heart added 🕐 waiting on upstream Something needs to change in create-react-app or react-app-rewired first and removed 🐛 bug Something isn't working labels Sep 29, 2019
@with-heart
Copy link
Collaborator

css-loader was bumped to 3.2.0 13 days ago in facebook/create-react-app#7876. If anyone wants to tackle this change, we can plan for including it in a 1.0 release since it would be a breaking change.

@with-heart with-heart removed the 🕐 waiting on upstream Something needs to change in create-react-app or react-app-rewired first label Nov 6, 2019
@with-heart
Copy link
Collaborator

#185 has been published under v1.0.0-alpha.0. You can get to it using customize-cra@next.

@kunjiang
Copy link

I have trouble in here, but mybe it could change to:

 {
      test: lessModuleRegex,
      use: getLessLoader({
        importLoaders: 2,
        modules: {
            localIdentName: localIdentName,
        }
      })
 }

@with-heart
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧨 breaking change Require a major breaking release to implement.
Projects
None yet
Development

No branches or pull requests

5 participants