Skip to content

Conversation

@danhcanva
Copy link

Summary
min-css-extract-plugin generates contentHash's corresponding to an empty file for chunks with no css modules.
image
Note: ef46db3751d8e999 is the hash of an empty file in the hash algorithm used in the example

It does this because it only checks if the set modules exists, but the set modules is just filtered for css chunks and so in the case there are no css chunks will return a set of length zero which still evaluates as true. See the code changes for more details, it should make sense, comment if it doesn't.

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
No - happy to add if this change looks good

Does this PR introduce a breaking change?
This should not introduce a breaking change, someone may have done something weird with this output though, or assume that contentHash['css/mini-extract'] is defined.

If relevant, what needs to be documented once your changes are merged or what have you already documented?
I don't believe there's any documentation required for this.

@linux-foundation-easycla
Copy link

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant