import { createRequire } from "node:module" ; let require ; export async function loadFile ( path ) { try { return await import ( path ) ; } catch ( error ) { try { require ??= createRequire ( import . meta . url ) ; return require ( path ) ; } catch { throw error ; } } }