MCPcopy
hub / github.com/webpack/webpack / normalizeName

Function normalizeName

lib/optimize/SplitChunksPlugin.js:455–462  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

453 * @returns {GetNameFn | undefined} a function to get the name of the chunk
454 */
455const normalizeName = (name) => {
456 if (typeof name === "string") {
457 return () => name;
458 }
459 if (typeof name === "function") {
460 return /** @type {GetNameFn} */ (name);
461 }
462};
463
464/**
465 * Normalizes chunks filter.

Callers 2

createCacheGroupSourceFunction · 0.85
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected