Skip to content

getLocalIdent not working #389

@Shuumatsu

Description

@Shuumatsu

I'm using [email protected] which is the latest version and [email protected].

My css file loaders configuration is below

{
          test: /\.css$/,
          use: [
            { loader: 'style-loader' },
            {
              loader: 'css-loader',
              options: {
                module: true,
                // getLocalIdent: (loaderContext, localIdentName, localName, options) => `${loaderContext}-${localIdentName}-${localName}-${options}`,
                getLocalIdent: function (loaderContext, localIdentName, localName, options) {
                  console.log(arguments)
                  return 'whatever_random_class_name'
                },
                localIdentName: '[path]---[name]---[local]---[hash:base64:5]'
              }
            },
            { loader: 'postcss-loader' }
          ]
        },

no output in the console, the function is not even called

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions