Bun Get the directory of the current file

Get the directory of the current file

jarle Updated

File contents

Get the directory of the current file

Bun provides a handful of module-specific utilities on the import.meta object.

import.meta.dir; // => "/a/b"

See Docs > API > import.meta for complete documentation.

jarle/bun-skills/tree/main/skills/bun-guides-util-import-meta-dir commit 5ced76ffc7

Frequently asked questions

npx skillmds@latest add jarle/bun-get-the-directory-of-the-current-file