Skip to content

Option localIdentRegExp doesn't work after upgraded to 6.0. #1346

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

Closed
latin-1 opened this issue Jul 17, 2021 · 1 comment · Fixed by #1349
Closed

Option localIdentRegExp doesn't work after upgraded to 6.0. #1346

latin-1 opened this issue Jul 17, 2021 · 1 comment · Fixed by #1349

Comments

@latin-1
Copy link

latin-1 commented Jul 17, 2021

  • Operating System: Arch Linux
  • Node Version: 16.4.2
  • NPM Version: 7.17.0
  • webpack Version: 5.45.1
  • css-loader Version: 6.0.0

Expected Behavior

[1] placeholder should be replaced with the matched pattern.

Actual Behavior

[1] appears in generated class names.

Code

{
  loader: require.resolve("css-loader"),
  options: {
    modules: {
      localIdentName: "[1]__[local]__[hash:base64:8]",
      localIdentRegExp: /[/\\]([^/\\]+?)(?:\.module)?\.[^./\\]+$/,
    },
  },
},

How Do We Reproduce?

It seems that the localIdentRegExp option has never been used in the default getLocalIdent function. If that's the expected behavior, please note that in the changelog as a breaking change.

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