MCPcopy
hub / github.com/webpack/webpack / getSize

Method getSize

lib/wasm-sync/WebAssemblyGenerator.js:448–454  ·  view source on GitHub ↗

* Returns the estimated size for the requested source type. * @param {NormalModule} module the module * @param {SourceType=} type source type * @returns {number} estimate size of the module

(module, type)

Source from the content-addressed store, hash-verified

446 * @returns {number} estimate size of the module
447 */
448 getSize(module, type) {
449 const originalSource = module.originalSource();
450 if (!originalSource) {
451 return 0;
452 }
453 return originalSource.size();
454 }
455
456 /**
457 * Generates generated code for this runtime module.

Callers

nothing calls this directly

Calls 2

originalSourceMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected