MCPcopy
hub / github.com/webpack/webpack / checkExternalVariable

Function checkExternalVariable

lib/ExternalModule.js:705–708  ·  view source on GitHub ↗
(variableName, request, runtimeTemplate)

Source from the content-addressed store, hash-verified

703 * @returns {string} the generated source
704 */
705const checkExternalVariable = (variableName, request, runtimeTemplate) =>
706 `if(typeof ${variableName} === 'undefined') { ${runtimeTemplate.throwMissingModuleErrorBlock(
707 { request }
708 )} }\n`;
709
710/**
711 * Gets source for amd or umd external.

Callers 2

getSourceForDefaultCaseFunction · 0.85

Calls 1

Tested by

no test coverage detected