MCPcopy
hub / github.com/webpack/webpack / size

Method size

lib/optimize/ConcatenatedModule.js:1088–1095  ·  view source on GitHub ↗

* Returns the estimated size for the requested source type. * @param {string=} type the source type for which the size should be estimated * @returns {number} the estimated size of the module (must be non-zero)

(type)

Source from the content-addressed store, hash-verified

1086 * @returns {number} the estimated size of the module (must be non-zero)
1087 */
1088 size(type) {
1089 // Guess size from embedded modules
1090 let size = 0;
1091 for (const module of this._modules) {
1092 size += module.size(type);
1093 }
1094 return size;
1095 }
1096
1097 /**
1098 * @private

Callers 6

applySplitMethod · 0.45
applyMethod · 0.45
applyMethod · 0.45
getSizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected