diff --git a/src/utils.js b/src/utils.js index 5d3ae360..f76bf027 100644 --- a/src/utils.js +++ b/src/utils.js @@ -327,8 +327,12 @@ function defaultGetLocalIdent( let localIdentHash = ""; for (let tier = 0; localIdentHash.length < hashDigestLength; tier++) { - // eslint-disable-next-line no-underscore-dangle - const hash = loaderContext._compiler.webpack.util.createHash(hashFunction); + const hash = ( + loaderContext.utils.createHash || + // TODO remove in the next major release + // eslint-disable-next-line no-underscore-dangle + loaderContext._compiler.webpack.util.createHash + )(hashFunction); if (hashSalt) { hash.update(hashSalt);