MCPcopy Create free account
hub / github.com/vercel/vercel / loadModule

Function loadModule

packages/node/src/bundling-handler.js:75–77  ·  view source on GitHub ↗

* Load a module via dynamic import(). Works for both CJS and ESM regardless * of the file extension or the package.json "type" field.

(filePath)

Source from the content-addressed store, hash-verified

73 * of the file extension or the package.json "type" field.
74 */
75async function loadModule(filePath) {
76 return import(pathToFileURL(filePath).href);
77}
78
79/**
80 * Unwrap nested default exports (common with TS/ESM compiled to CJS).

Callers 1

compileUserCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected