MCPcopy
hub / github.com/webpack/webpack / syncModuleFactory

Method syncModuleFactory

lib/RuntimeTemplate.js:1552–1563  ·  view source on GitHub ↗

* Sync module factory. * @param {object} options options * @param {Dependency} options.dependency the dependency * @param {ChunkGraph} options.chunkGraph the chunk graph * @param {RuntimeRequirements} options.runtimeRequirements if set, will be filled with runtime requirements * @param {st

({ dependency, chunkGraph, runtimeRequirements, request })

Source from the content-addressed store, hash-verified

1550 * @returns {string} expression
1551 */
1552 syncModuleFactory({ dependency, chunkGraph, runtimeRequirements, request }) {
1553 const module = chunkGraph.moduleGraph.getModule(dependency);
1554 const factory = this.returningFunction(
1555 this.moduleRaw({
1556 module,
1557 chunkGraph,
1558 request,
1559 runtimeRequirements
1560 })
1561 );
1562 return this.returningFunction(factory);
1563 }
1564
1565 /**
1566 * Define es module flag statement.

Callers 2

codeGenerationMethod · 0.80
codeGenerationMethod · 0.80

Calls 3

returningFunctionMethod · 0.95
moduleRawMethod · 0.95
getModuleMethod · 0.45

Tested by

no test coverage detected