import { fileURLToPath } from "url"; /** * Pass in `import.meta` to get the __dirname. */ export const getDirname = (importMeta: ImportMeta) => fileURLToPath(new URL('.', importMeta.url));