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

Method build

lib/sharing/ConsumeSharedModule.js:151–165  ·  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

149 * @returns {void}
150 */
151 build(options, compilation, resolver, fs, callback) {
152 this.buildMeta = {};
153 this.buildInfo = {};
154 if (this.options.import) {
155 const dep = new ConsumeSharedFallbackDependency(this.options.import);
156 if (this.options.eager) {
157 this.addDependency(dep);
158 } else {
159 const block = new AsyncDependenciesBlock({});
160 block.addDependency(dep);
161 this.addBlock(block);
162 }
163 }
164 callback();
165 }
166
167 /**
168 * Returns the source types this module can generate.

Callers

nothing calls this directly

Calls 3

addDependencyMethod · 0.65
callbackFunction · 0.50
addBlockMethod · 0.45

Tested by

no test coverage detected