MCPcopy
hub / github.com/webpack/webpack / externalsRootArray

Method externalsRootArray

lib/library/UmdLibraryPlugin.js:198–213  ·  view source on GitHub ↗
(modules)

Source from the content-addressed store, hash-verified

196 * @returns {string} result
197 */
198 const externalsRootArray = (modules) =>
199 replaceKeys(
200 modules
201 .map((m) => {
202 let request = m.request;
203 if (typeof request === "object") {
204 request =
205 /** @type {RequestRecord} */
206 (request).root;
207 }
208 return `root${accessorToObjectAccess([
209 ...(Array.isArray(request) ? request : [request])
210 ])}`;
211 })
212 .join(", ")
213 );
214
215 /**
216 * Externals require array.

Callers

nothing calls this directly

Calls 2

accessorToObjectAccessFunction · 0.85
isArrayMethod · 0.80

Tested by

no test coverage detected