Skip to content

Instantly share code, notes, and snippets.

@inwardmovement
Created December 13, 2023 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inwardmovement/90d66648e83cd296842cf4c19b57ce50 to your computer and use it in GitHub Desktop.
Save inwardmovement/90d66648e83cd296842cf4c19b57ce50 to your computer and use it in GitHub Desktop.
Node __dirname ESM
import { mkdir, writeFile } from "node:fs"
import { fileURLToPath } from "node:url"
import path from "node:path"
const __dirname = path.dirname(fileURLToPath(import.meta.url))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment