opened
Zzzen
username_0
<!-- Before creating an issue please make sure you are using the latest version of css-loader. -->

**Do you want to request a *feature* or report a *bug*?**
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). Questions will be closed. -->
Feature
**If this is a feature request, what is motivation or use case for changing the behavior?**
`localIdentName` can only be specified as a string. It would be great if css-loader accepts a function that returns a custom ident:
```
{
    loader: 'css-loader',
    options: {
        sourceMap: true,
        localIdentName ({ local, path, name }) {
            const str = 'xxx';
            return `${path}_${str}_${local}`
        },
    },
}
```
**Please mention other relevant information such as your webpack version, Node.js version and Operating System.**
Custom `localIdentName` function?
issue
created
frenzzy
username_1
Why don't you want to use this?
```js
localIdentName: '[path]_xxx_[local]'
```
Or can you provide more realistic example?
comment
created
odensc
username_2
You can already do this with `getLocalIdent`, check out the readme. :)

```js
{
  loader: 'css-loader',
  options: {
    modules: true,
    localIdentName: '[path][name]__[local]--[hash:base64:5]',
    getLocalIdent: (context, localIdentName, localName, options) => {
      return 'whatever_random_class_name'
    }
  }
}
```
comment
closed
Zzzen
username_0
issue
created
Zzzen
username_0
Ooops
comment