Created
October 15, 2023 13:22
-
-
Save vv13/562deb352aa70ab8bf3eef78f6261af1 to your computer and use it in GitHub Desktop.
__dirname in ESModule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fileURLToPath } from "node:url" | |
export const __dirname = () => fileURLToPath(import.meta.url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment