externalsRequireArray = type =>
			replaceKeys(
				externals
					.map(m => {
						let expr;
						let request = m.request;
						if (typeof request === "object") {
							request =
								/** @type {RequestRecord} */
								(request)[type];
						}
						if (request === undefined) {
							throw new Error(
								`Missing external configuration for type:${type}`
							);
						}
						expr = Array.isArray(request)
							? `require(${JSON.stringify(
									request[0]
								)})${accessorToObjectAccess(request.slice(1))}`
							: `require(${JSON.stringify(request)})`;
						if (m.isOptional(moduleGraph)) {
							expr = `(function webpackLoadOptionalExternalModule() { try { return ${expr}; } catch(e) {} }())`;
						}
						return expr;
					})
					.join(", ")
			)
@param {string} type the type
@returns {string} external require array