replacePlaceholdersInFilename(compiler, filename, fileContent, compilation) {
    if (/\[\\*([\w:]+)\\*\]/i.test(filename) === false) {
      return { path: filename, info: {} };
    }

    const hash = compiler.webpack.util.createHash(
      compilation.outputOptions.hashFunction,
    );

    hash.update(fileContent);

    if (compilation.outputOptions.hashSalt) {
      hash.update(compilation.outputOptions.hashSalt);
    }

    const contentHash = /** @type {string} */ (
      hash
        .digest(compilation.outputOptions.hashDigest)
        .slice(0, compilation.outputOptions.hashDigestLength)
    );

    return compilation.getPathWithInfo(filename, {
      contentHash,
      chunk: {
        hash: contentHash,
        // @ts-ignore
        contentHash,
      },
    });
  }
Replace [contenthash] in filename

@see https://survivejs.com/webpack/optimizing/adding-hashes-to-filenames/

@private
@param {Compiler} compiler
@param {string} filename
@param {string|Buffer} fileContent
@param {Compilation} compilation
@returns {{ path: string, info: {} }}