Skip to content

Commit 4e4a95d

Browse files
fix: prevent generation of a contentHash for a chunk when the set of css modules is of size 0 (#1154)
1 parent 54f775d commit 4e4a95d

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
@@ -795,7 +795,7 @@ class MiniCssExtractPlugin {
795795
compilation.runtimeTemplate.requestShortener,
796796
);
797797

798-
if (modules) {
798+
if (modules.size > 0) {
799799
const { hashFunction, hashDigest, hashDigestLength } = outputOptions;
800800
const { createHash } = compiler.webpack.util;
801801
const hash = createHash(/** @type {string} */ (hashFunction));

0 commit comments

Comments
 (0)