Skip to content

Dirname in ES modules

const __dirname = import.meta.dirname;
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));

import.meta.resolve()