MCPcopy
hub / github.com/webpack/webpack / build

Method build

lib/container/RemoteModule.js:117–133  ·  view source on GitHub ↗

* Builds the module using the provided compilation context. * @param {WebpackOptions} options webpack options * @param {Compilation} compilation the compilation * @param {ResolverWithOptions} resolver the resolver * @param {InputFileSystem} fs the file system * @param {BuildCallback} callb

(options, compilation, resolver, fs, callback)

Source from the content-addressed store, hash-verified

115 * @returns {void}
116 */
117 build(options, compilation, resolver, fs, callback) {
118 this.buildMeta = {};
119 this.buildInfo = {
120 strict: true
121 };
122
123 this.clearDependenciesAndBlocks();
124 if (this.externalRequests.length === 1) {
125 this.addDependency(
126 new RemoteToExternalDependency(this.externalRequests[0])
127 );
128 } else {
129 this.addDependency(new FallbackDependency(this.externalRequests));
130 }
131
132 callback();
133 }
134
135 /**
136 * Returns the estimated size for the requested source type.

Callers

nothing calls this directly

Calls 3

addDependencyMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected