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

Method sourceModule

lib/javascript/JavascriptGenerator.js:224–256  ·  view source on GitHub ↗

* Processes the provided module. * @param {Module} 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} generateContext

(module, initFragments, source, generateContext)

Source from the content-addressed store, hash-verified

222 * @returns {void}
223 */
224 sourceModule(module, initFragments, source, generateContext) {
225 for (const dependency of module.dependencies) {
226 this.sourceDependency(
227 module,
228 dependency,
229 initFragments,
230 source,
231 generateContext
232 );
233 }
234
235 if (module.presentationalDependencies !== undefined) {
236 for (const dependency of module.presentationalDependencies) {
237 this.sourceDependency(
238 module,
239 dependency,
240 initFragments,
241 source,
242 generateContext
243 );
244 }
245 }
246
247 for (const childBlock of module.blocks) {
248 this.sourceBlock(
249 module,
250 childBlock,
251 initFragments,
252 source,
253 generateContext
254 );
255 }
256 }
257
258 /**
259 * Generates generated code for this runtime module.

Callers 1

generateMethod · 0.95

Calls 2

sourceDependencyMethod · 0.95
sourceBlockMethod · 0.95

Tested by

no test coverage detected