Skip to content

CSS: conflicting hashed names if filename + name matches, but in different folders #20795

@Knagis

Description

@Knagis

Have you used AI?

None

Bug Description

foo/bar.css

.xxx {}

bar/bar.css

.xxx {}

both classes will be emitted with the same hashed name, because CssIcssExportDependency.js has

		hash.update(relativeResourcePath);
		hash.update(local);

it uses relative path, which at least in my cases is ./bar.css

Link to Minimal Reproduction and step to reproduce

Expected Behavior

no collisions between classes defined in different files.

Actual Behavior

collisions happen

Environment

webpack 5.106.0

Is this a regression?

None

Last Working Version

No response

Additional Context

No response

Metadata

Metadata

Assignees

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