addModules = (modules, chunk, list) => {
			for (const m of modules) {
				const module = m;
				const id = /** @type {ModuleId} */ (chunkGraph.getModuleId(module));
				list.push(id);
				moduleIdToSourceMapping.set(
					id,
					codeGenerationResults.getSource(
						module,
						chunk.runtime,
						"consume-shared"
					)
				);
			}
		}
@param {Iterable<Module>} modules modules
@param {Chunk} chunk the chunk
@param {(string | number)[]} list list of ids