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 Failed to compile #199

Closed
Menci opened this issue Dec 13, 2019 · 2 comments
Closed

addLessLoader Failed to compile #199

Menci opened this issue Dec 13, 2019 · 2 comments

Comments

@Menci
Copy link

Menci commented Dec 13, 2019

Failed to compile.

./src/layouts/AppLayout.module.less (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-8-1!./node_modules/postcss-loader/src??postcss!./node_modules/less-loader/dist/cjs.js??ref--6-oneOf-8-3!./src/layouts/AppLayout.module.less)
ValidationError: Invalid options object. CSS Loader has been initialised using an options object that does not match the API schema.
 - options has an unknown property 'localIdentName'. These properties are valid:
   object { url?, import?, modules?, sourceMap?, importLoaders?, localsConvention?, onlyLocals? }

Maybe same as rails/webpacker#2197?

@with-heart
Copy link
Collaborator

with-heart commented Dec 15, 2019

Hi @Menci, sorry for not getting back to you sooner. I appreciate the issue and your PR.

We currently have #185 by @onlyling merged into the next branch (since it's a breaking change). This is published under customize-cra@next and uses the new modules configuration format for css-loader.

However that PR changed localIdentName from "[path][name]__[local]--[hash:base64:5]" to "[local]--[hash:base64:5]", while your change preserves the existing localIdentName.

Do you have any familiarity with css-loader/less-loader configuration? I don't know much about either of them, so I'm not sure what would work better for us. Any opinions?

@with-heart
Copy link
Collaborator

Closing this in favor of #201 so we can continue all addLessLoader-related conversation in one place. Please join us there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants