getAssetsInformationByGroups(compilation, outputName, entryNames) {
    /** The public path used inside the html file */
    const publicPath = this.getPublicPath(
      compilation,
      outputName,
      this.options.publicPath,
    );
    /**
     * @type {AssetsInformationByGroups}
     */
    const assets = {
      // The public path
      publicPath,
      // Will contain all js and mjs files
      js: [],
      // Will contain all css files
      css: [],
      // Will contain the html5 appcache manifest files if it exists
      manifest: Object.keys(compilation.assets).find(
        (assetFile) => path.extname(assetFile) === ".appcache",
      ),
      // Favicon
      favicon: undefined,
    };

    // Append a hash for cache busting
    if (this.options.hash && assets.manifest) {
      assets.manifest = this.appendHash(
        assets.manifest,
        /** @type {string} */ (compilation.hash),
      );
    }

    // Extract paths to .js, .mjs and .css files from the current compilation
    const entryPointPublicPathMap = {};
    const extensionRegexp = /\.(css|js|mjs)(\?|$)/;

    for (let i = 0; i < entryNames.length; i++) {
      const entryName = entryNames[i];
      /** entryPointUnfilteredFiles - also includes hot module update files */
      const entryPointUnfilteredFiles = /** @type {Entrypoint} */ (
        compilation.entrypoints.get(entryName)
      ).getFiles();
      const entryPointFiles = entryPointUnfilteredFiles.filter((chunkFile) => {
        const asset = compilation.getAsset(chunkFile);

        if (!asset) {
          return true;
        }

        // Prevent hot-module files from being included:
        const assetMetaInformation = asset.info || {};

        return !(
          assetMetaInformation.hotModuleReplacement ||
          assetMetaInformation.development
        );
      });
      // Prepend the publicPath and append the hash depending on the
      // webpack.output.publicPath and hashOptions
      // E.g. bundle.js -> /bundle.js?hash
      const entryPointPublicPaths = entryPointFiles.map((chunkFile) => {
        const entryPointPublicPath = publicPath + this.urlencodePath(chunkFile);
        return this.options.hash
          ? this.appendHash(
              entryPointPublicPath,
              /** @type {string} */ (compilation.hash),
            )
          : entryPointPublicPath;
      });

      entryPointPublicPaths.forEach((entryPointPublicPath) => {
        const extMatch = extensionRegexp.exec(
          /** @type {string} */ (entryPointPublicPath),
        );

        // Skip if the public path is not a .css, .mjs or .js file
        if (!extMatch) {
          return;
        }

        // Skip if this file is already known
        // (e.g. because of common chunk optimizations)
        if (entryPointPublicPathMap[entryPointPublicPath]) {
          return;
        }

        entryPointPublicPathMap[entryPointPublicPath] = true;

        // ext will contain .js or .css, because .mjs recognizes as .js
        const ext = extMatch[1] === "mjs" ? "js" : extMatch[1];

        assets[ext].push(entryPointPublicPath);
      });
    }

    return assets;
  }
The getAssetsForHTML extracts the asset information of a webpack compilation for all given entry names.

@private
@param {Compilation} compilation
@param {string} outputName
@param {string[]} entryNames
@returns {AssetsInformationByGroups}