Skip to content

contenthash generates same filename for different contents #454

Closed
@zlk89

Description

@zlk89
  • Operating System: macOS 10.14.6
  • Node Version: v8.11.2
  • NPM Version: 6.0.1
  • webpack Version: 4.41.2
  • mini-css-extract-plugin Version: 0.8.0

Expected Behavior

Should generate different filename when content is changed.

Actual Behavior

Same filename was generated when content is updated.

How Do We Reproduce?

https://github.com/zlk89/webpack-css-contenthash-diff

  • yarn to install packages
  • yarn build
  • under dist folder, you will find two css files with same content hash, while content is different.

Basically contenthash is same, when import statement order is different:

// in js
@import 'a.scss';
@import 'b.scss';
// in js
@import 'b.scss';
@import 'a.scss';

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