_getSourceData(
		request,
		externalType,
		runtimeTemplate,
		moduleGraph,
		chunkGraph,
		runtime,
		dependencyMeta
	) {
		switch (externalType) {
			case "this":
			case "window":
			case "self":
				return getSourceForGlobalVariableExternal(request, this.externalType);
			case "global":
				return getSourceForGlobalVariableExternal(
					request,
					runtimeTemplate.globalObject
				);
			case "commonjs":
			case "commonjs2":
			case "commonjs-module":
			case "commonjs-static":
				return getSourceForCommonJsExternal(request);
			case "node-commonjs":
				return /** @type {BuildInfo} */ (this.buildInfo).module
					? getSourceForCommonJsExternalInNodeModule(
							request,
							/** @type {string} */
							(runtimeTemplate.outputOptions.importMetaName),
							/** @type {boolean} */
							(runtimeTemplate.supportNodePrefixForCoreModules())
						)
					: getSourceForCommonJsExternal(request);
			case "amd":
			case "amd-require":
			case "umd":
			case "umd2":
			case "system":
			case "jsonp": {
				const id = chunkGraph.getModuleId(this);
				return getSourceForAmdOrUmdExternal(
					id !== null ? id : this.identifier(),
					this.isOptional(moduleGraph),
					request,
					runtimeTemplate
				);
			}
			case "import":
				return getSourceForImportExternal(
					request,
					runtimeTemplate,
					/** @type {ImportDependencyMeta} */ (dependencyMeta)
				);
			case "script":
				return getSourceForScriptExternal(request, runtimeTemplate);
			case "module": {
				if (!(/** @type {BuildInfo} */ (this.buildInfo).module)) {
					if (!runtimeTemplate.supportsDynamicImport()) {
						throw new Error(
							`The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script${
								runtimeTemplate.supportsEcmaScriptModuleSyntax()
									? "\nDid you mean to build a EcmaScript Module ('output.module: true')?"
									: ""
							}`
						);
					}
					return getSourceForImportExternal(
						request,
						runtimeTemplate,
						/** @type {ImportDependencyMeta} */ (dependencyMeta)
					);
				}
				if (!runtimeTemplate.supportsEcmaScriptModuleSyntax()) {
					throw new Error(
						"The target environment doesn't support EcmaScriptModule syntax so it's not possible to use external type 'module'"
					);
				}
				return getSourceForModuleExternal(
					request,
					moduleGraph.getExportsInfo(this),
					runtime,
					runtimeTemplate,
					/** @type {ImportDependencyMeta} */ (dependencyMeta)
				);
			}
			case "var":
			case "promise":
			case "const":
			case "let":
			case "assign":
			default:
				return getSourceForDefaultCase(
					this.isOptional(moduleGraph),
					request,
					runtimeTemplate
				);
		}
	}
@private
@param {string | string[]} request request
@param {string} externalType the external type
@param {RuntimeTemplate} runtimeTemplate the runtime template
@param {ModuleGraph} moduleGraph the module graph
@param {ChunkGraph} chunkGraph the chunk graph
@param {RuntimeSpec} runtime the runtime
@param {DependencyMeta | undefined} dependencyMeta the dependency meta
@returns {SourceData} the source data