addChunkInGroup(groupOptions, module, loc, request) {
		if (typeof groupOptions === "string") {
			groupOptions = { name: groupOptions };
		}
		const name = groupOptions.name;
		if (name) {
			const chunkGroup = this.namedChunkGroups.get(name);
			if (chunkGroup !== undefined) {
				if (module) {
					chunkGroup.addOrigin(
						module,
						/** @type {DependencyLocation} */
						(loc),
						/** @type {string} */
						(request)
					);
				}
				return chunkGroup;
			}
		}
		const chunkGroup = new ChunkGroup(groupOptions);
		if (module)
			chunkGroup.addOrigin(
				module,
				/** @type {DependencyLocation} */
				(loc),
				/** @type {string} */
				(request)
			);
		const chunk = this.addChunk(name);

		connectChunkGroupAndChunk(chunkGroup, chunk);

		this.chunkGroups.push(chunkGroup);
		if (name) {
			this.namedChunkGroups.set(name, chunkGroup);
		}
		return chunkGroup;
	}
If `module` is passed, `loc` and `request` must also be passed.
@param {string | ChunkGroupOptions} groupOptions options for the chunk group
@param {Module=} module the module the references the chunk group
@param {DependencyLocation=} loc the location from with the chunk group is referenced (inside of module)
@param {string=} request the request from which the the chunk group is referenced
@returns {ChunkGroup} the new or existing chunk group