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

Method getSize

lib/javascript/JavascriptGenerator.js:76–82  ·  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

74 * @returns {number} estimate size of the module
75 */
76 getSize(module, type) {
77 const originalSource = module.originalSource();
78 if (!originalSource) {
79 return DEFAULT_SOURCE.size();
80 }
81 return originalSource.size();
82 }
83
84 /**
85 * Returns the reason this module cannot be concatenated, when one exists.

Callers

nothing calls this directly

Calls 2

originalSourceMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected