MCPcopy
hub / github.com/webpack/webpack / getModulesSize

Function getModulesSize

lib/ChunkGraph.js:174–182  ·  view source on GitHub ↗
(modules)

Source from the content-addressed store, hash-verified

172 * @returns {number} the size of the modules
173 */
174const getModulesSize = (modules) => {
175 let size = 0;
176 for (const module of modules) {
177 for (const type of module.getSourceTypes()) {
178 size += module.size(type);
179 }
180 }
181 return size;
182};
183
184/** @typedef {Record<string, number>} SizesOfModules */
185

Callers 1

Calls 2

getSourceTypesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected