renderContentAsset(
    compiler,
    compilation,
    chunk,
    modules,
    requestShortener,
    filenameTemplate,
    pathData
  ) {
    const usedModules = this.sortModules(
      compilation,
      chunk,
      modules,
      requestShortener
    );

    const { ConcatSource, SourceMapSource, RawSource } =
      compiler.webpack.sources;
    const source = new ConcatSource();
    const externalsSource = new ConcatSource();

    for (const module of usedModules) {
      let content = module.content.toString();

      const readableIdentifier = module.readableIdentifier(requestShortener);
      const startsWithAtRuleImport = /^@import url/.test(content);

      let header;

      if (compilation.outputOptions.pathinfo) {
        // From https://github.com/webpack/webpack/blob/29eff8a74ecc2f87517b627dee451c2af9ed3f3f/lib/ModuleInfoHeaderPlugin.js#L191-L194
        const reqStr = readableIdentifier.replace(/\*\//g, "*_/");
        const reqStrStar = "*".repeat(reqStr.length);
        const headerStr = `/*!****${reqStrStar}****!*\\\n  !*** ${reqStr} ***!\n  \\****${reqStrStar}****/\n`;

        header = new RawSource(headerStr);
      }

      if (startsWithAtRuleImport) {
        if (typeof header !== "undefined") {
          externalsSource.add(header);
        }

        // HACK for IE
        // http://stackoverflow.com/a/14676665/1458162
        if (
          module.media ||
          module.supports ||
          typeof module.layer !== "undefined"
        ) {
          let atImportExtra = "";

          const needLayer = typeof module.layer !== "undefined";

          if (needLayer) {
            atImportExtra +=
              module.layer.length > 0 ? ` layer(${module.layer})` : " layer";
          }

          if (module.supports) {
            atImportExtra += ` supports(${module.supports})`;
          }

          if (module.media) {
            atImportExtra += ` ${module.media}`;
          }

          // insert media into the @import
          // this is rar
          // TODO improve this and parse the CSS to support multiple medias
          content = content.replace(/;|\s*$/, `${atImportExtra};`);
        }

        externalsSource.add(content);
        externalsSource.add("\n");
      } else {
        if (typeof header !== "undefined") {
          source.add(header);
        }

        if (module.supports) {
          source.add(`@supports (${module.supports}) {\n`);
        }

        if (module.media) {
          source.add(`@media ${module.media} {\n`);
        }

        const needLayer = typeof module.layer !== "undefined";

        if (needLayer) {
          source.add(
            `@layer${module.layer.length > 0 ? ` ${module.layer}` : ""} {\n`
          );
        }

        const { path: filename } = compilation.getPathWithInfo(
          filenameTemplate,
          pathData
        );

        const undoPath = getUndoPath(filename, compiler.outputPath, false);

        // replacements
        content = content.replace(new RegExp(ABSOLUTE_PUBLIC_PATH, "g"), "");
        content = content.replace(
          new RegExp(SINGLE_DOT_PATH_SEGMENT, "g"),
          "."
        );
        content = content.replace(new RegExp(AUTO_PUBLIC_PATH, "g"), undoPath);

        const entryOptions = chunk.getEntryOptions();
        const baseUriReplacement =
          (entryOptions && entryOptions.baseUri) || undoPath;
        content = content.replace(
          new RegExp(BASE_URI, "g"),
          baseUriReplacement
        );

        if (module.sourceMap) {
          source.add(
            new SourceMapSource(
              content,
              readableIdentifier,
              module.sourceMap.toString()
            )
          );
        } else {
          source.add(new RawSource(content));
        }

        source.add("\n");

        if (needLayer) {
          source.add("}\n");
        }

        if (module.media) {
          source.add("}\n");
        }

        if (module.supports) {
          source.add("}\n");
        }
      }
    }

    return new ConcatSource(externalsSource, source);
  }
@private
@param {Compiler} compiler
@param {Compilation} compilation
@param {Chunk} chunk
@param {CssModule[]} modules
@param {Compiler["requestShortener"]} requestShortener
@param {string} filenameTemplate
@param {Parameters<Exclude<Required<Configuration>['output']['filename'], string | undefined>>[0]} pathData
@returns {Source}