MCPcopy Create free account
hub / github.com/callstack/haul / currentRequire

Function currentRequire

packages/haul-core/src/utils/importModule.ts:96–104  ·  view source on GitHub ↗
(moduleId: string)

Source from the content-addressed store, hash-verified

94
95 // Create require function for this module.
96 const currentRequire = (moduleId: string) => {
97 return loadModule(moduleId, {
98 resolve: currentResolve,
99 parentModule: module,
100 ignore: provided.ignore,
101 cache: provided.cache,
102 runtime: provided.runtime,
103 });
104 };
105
106 // Set `resolve` and `cache` on `require` function.
107 currentRequire.resolve = currentResolve;

Callers

nothing calls this directly

Calls 1

loadModuleFunction · 0.85

Tested by

no test coverage detected