MCPcopy
hub / github.com/webpack/webpack / getFullChunkName

Function getFullChunkName

lib/ids/IdHelpers.js:205–217  ·  view source on GitHub ↗
(
	chunk,
	chunkGraph,
	context,
	associatedObjectForCache
)

Source from the content-addressed store, hash-verified

203 * @returns {string} full chunk name
204 */
205const getFullChunkName = (
206 chunk,
207 chunkGraph,
208 context,
209 associatedObjectForCache
210) => {
211 if (chunk.name) return chunk.name;
212 const modules = chunkGraph.getChunkRootModules(chunk);
213 const fullModuleNames = modules.map((m) =>
214 makePathsRelative(context, m.identifier(), associatedObjectForCache)
215 );
216 return fullModuleNames.join();
217};
218
219/**
220 * Adds to map of items.

Callers 1

applyMethod · 0.85

Calls 2

getChunkRootModulesMethod · 0.80
identifierMethod · 0.45

Tested by

no test coverage detected