MCPcopy Create free account
hub / github.com/codesandbox/codesandbox-client / createRequire

Method createRequire

packages/node-services/src/module.ts:140–145  ·  view source on GitHub ↗
(fromPath: string)

Source from the content-addressed store, hash-verified

138 }
139
140 static createRequire(fromPath: string) {
141 const module = new Module(fromPath);
142 module.filename = fromPath;
143
144 return module._createRequire();
145 }
146
147 _createRequire() {
148 const require = (p: string) => this.require(p);

Callers

nothing calls this directly

Calls 1

_createRequireMethod · 0.95

Tested by

no test coverage detected