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

Method build

lib/sharing/ProvideSharedModule.js:106–123  ·  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

104 * @returns {void}
105 */
106 build(options, compilation, resolver, fs, callback) {
107 this.buildMeta = {};
108 this.buildInfo = {
109 strict: true
110 };
111
112 this.clearDependenciesAndBlocks();
113 const dep = new ProvideForSharedDependency(this._request);
114 if (this._eager) {
115 this.addDependency(dep);
116 } else {
117 const block = new AsyncDependenciesBlock({});
118 block.addDependency(dep);
119 this.addBlock(block);
120 }
121
122 callback();
123 }
124
125 /**
126 * Returns the estimated size for the requested source type.

Callers

nothing calls this directly

Calls 4

addDependencyMethod · 0.65
callbackFunction · 0.50
addBlockMethod · 0.45

Tested by

no test coverage detected