MCPcopy
hub / github.com/webpack/webpack / moveModule

Method moveModule

lib/Chunk.js:301–309  ·  view source on GitHub ↗

* Moves a module from this chunk to another chunk. * @deprecated * @param {Module} module the module * @param {Chunk} otherChunk the target chunk * @returns {void}

(module, otherChunk)

Source from the content-addressed store, hash-verified

299 * @returns {void}
300 */
301 moveModule(module, otherChunk) {
302 const chunkGraph = ChunkGraph.getChunkGraphForChunk(
303 this,
304 "Chunk.moveModule",
305 "DEP_WEBPACK_CHUNK_MOVE_MODULE"
306 );
307 chunkGraph.disconnectChunkAndModule(this, module);
308 chunkGraph.connectChunkAndModule(otherChunk, module);
309 }
310
311 /**
312 * Integrates another chunk into this chunk when possible.

Callers

nothing calls this directly

Calls 3

getChunkGraphForChunkMethod · 0.80
connectChunkAndModuleMethod · 0.80

Tested by

no test coverage detected