MCPcopy
hub / github.com/webpack/webpack / visitResource

Method visitResource

lib/ContextModuleFactory.js:490–502  ·  view source on GitHub ↗
(resource, callback)

Source from the content-addressed store, hash-verified

488 * @param {ResolveDependenciesCallback} callback callback
489 */
490 const visitResource = (resource, callback) => {
491 if (typeof fs.realpath === "function") {
492 addDirectoryChecked(
493 resource,
494 resource,
495 /** @type {Set<string>} */
496 new Set(),
497 callback
498 );
499 } else {
500 addDirectory(resource, resource, addSubDirectory, callback);
501 }
502 };
503
504 if (typeof resource === "string") {
505 visitResource(resource, callback);

Callers

nothing calls this directly

Calls 1

addDirectoryFunction · 0.85

Tested by

no test coverage detected