Skip to content

Commit e2aca02

Browse files
authored
fix(contentHash): Prevent generation of a contentHash when the set of modules is of size 0
1 parent bed1799 commit e2aca02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ class MiniCssExtractPlugin {
786786
compilation.runtimeTemplate.requestShortener,
787787
);
788788

789-
if (modules) {
789+
if (modules?.size > 0) {
790790
const { hashFunction, hashDigest, hashDigestLength } = outputOptions;
791791
const { createHash } = compiler.webpack.util;
792792
const hash = createHash(/** @type {string} */ (hashFunction));

0 commit comments

Comments
 (0)