MCPcopy
hub / github.com/webpack/webpack / isEmpty

Method isEmpty

lib/Chunk.js:351–358  ·  view source on GitHub ↗

* Checks whether this chunk is empty. * @deprecated * @returns {boolean} true, if this chunk contains no module

()

Source from the content-addressed store, hash-verified

349 * @returns {boolean} true, if this chunk contains no module
350 */
351 isEmpty() {
352 const chunkGraph = ChunkGraph.getChunkGraphForChunk(
353 this,
354 "Chunk.isEmpty",
355 "DEP_WEBPACK_CHUNK_IS_EMPTY"
356 );
357 return chunkGraph.getNumberOfChunkModules(this) === 0;
358 }
359
360 /**
361 * Returns the total size of all modules in this chunk.

Callers 1

webpack.config.jsFile · 0.45

Calls 2

getChunkGraphForChunkMethod · 0.80

Tested by

no test coverage detected