Skip to content

generateScopedName generates different hash than css-loader #48

Closed
@yacodes

Description

@yacodes

Thanks, for making such cool feature as generateScopedName, but combining it with webpack's css-loader gives me different results.
Here is css-modules-require-hook config:

require('css-modules-require-hook')({
  generateScopedName: '[name]__[local]___[hash:base64:5]',
  mode: 'local'
});

And here is webpack's css-loader config:

{ 
      test: /\.css$/, 
      loader: 'style!css?modules&localIdentName=[name]__[local]___[hash:base64:5]!postcss',
      include: [
        path.resolve(__dirname, '..', 'app')
      ]
}

So hooks result is index__navitem___2ntrM, but css-loader's: index__navitem___1gRhv.

What can be wrong with config or is this hook's bug?

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