MCPcopy
hub / github.com/webpack/webpack / checkMinSize

Function checkMinSize

lib/optimize/SplitChunksPlugin.js:390–397  ·  view source on GitHub ↗
(sizes, minSize)

Source from the content-addressed store, hash-verified

388 * @returns {boolean} true if there are sizes and all existing sizes are at least `minSize`
389 */
390const checkMinSize = (sizes, minSize) => {
391 for (const key of /** @type {SourceType[]} */ (Object.keys(minSize))) {
392 const size = sizes[key];
393 if (size === undefined || size === 0) continue;
394 if (size < minSize[key]) return false;
395 }
396 return true;
397};
398
399/**
400 * Checks min size reduction.

Callers 1

applyMethod · 0.85

Calls 1

keysMethod · 0.65

Tested by

no test coverage detected