UNPKG

@boost/internal

Version:
13 lines (11 loc) 427 B
import { pathToFileURL } from 'node:url'; import { interopDefault } from './interopDefault.mjs'; // import() expects URLs, not file paths. // https://github.com/nodejs/node/issues/31710 async function importAbsoluteModule(path) { const file = pathToFileURL(path).toString(); const mod = await import(file); return interopDefault(mod); } export { importAbsoluteModule }; //# sourceMappingURL=importAbsoluteModule.mjs.map