MCPcopy
hub / github.com/webpack/webpack / sourceModule

Method sourceModule

lib/html/HtmlGenerator.js:334–366  ·  view source on GitHub ↗

* Processes the provided module. * @param {NormalModule} module the module to generate * @param {InitFragment<GenerateContext>[]} initFragments mutable list of init fragments * @param {ReplaceSource} source the current replace source which can be modified * @param {GenerateContext} generateC

(module, initFragments, source, generateContext)

Source from the content-addressed store, hash-verified

332 * @returns {void}
333 */
334 sourceModule(module, initFragments, source, generateContext) {
335 for (const dependency of module.dependencies) {
336 this.sourceDependency(
337 module,
338 dependency,
339 initFragments,
340 source,
341 generateContext
342 );
343 }
344
345 if (module.presentationalDependencies !== undefined) {
346 for (const dependency of module.presentationalDependencies) {
347 this.sourceDependency(
348 module,
349 dependency,
350 initFragments,
351 source,
352 generateContext
353 );
354 }
355 }
356
357 for (const childBlock of module.blocks) {
358 this.sourceBlock(
359 module,
360 childBlock,
361 initFragments,
362 source,
363 generateContext
364 );
365 }
366 }
367
368 /**
369 * Run all HTML dependency templates against the original module source and

Callers 1

_renderHtmlMethod · 0.95

Calls 2

sourceDependencyMethod · 0.95
sourceBlockMethod · 0.95

Tested by

no test coverage detected