MCPcopy
hub / github.com/webpack/webpack / tagDynamicImportReferenced

Function tagDynamicImportReferenced

lib/dependencies/ImportParserPlugin.js:70–83  ·  view source on GitHub ↗

* Tag dynamic import referenced. * @param {JavascriptParser} parser javascript parser * @param {ImportExpression} importCall import expression * @param {string} variableName variable name

(parser, importCall, variableName)

Source from the content-addressed store, hash-verified

68 * @param {string} variableName variable name
69 */
70function tagDynamicImportReferenced(parser, importCall, variableName) {
71 const state = getState(parser);
72 /** @type {RawReferencedExports} */
73 const references = state.get(importCall) || [];
74 state.set(importCall, references);
75 parser.tagVariable(
76 variableName,
77 dynamicImportTag,
78 /** @type {ImportSettings} */ ({
79 references,
80 expression: importCall
81 })
82 );
83}
84
85/**
86 * Gets fulfilled callback namespace obj.

Callers 2

applyMethod · 0.85

Calls 4

tagVariableMethod · 0.80
getStateFunction · 0.70
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected