Skip to main content
Bun provides a handful of module-specific utilities on the import.meta object. Use import.meta.file to retrieve the name of the current file.
https://mintcdn.com/bun-1dd33a4e-claude-fix-yaml-docs/ba6flgIPltjjNPcD/icons/typescript.svg?fit=max&auto=format&n=ba6flgIPltjjNPcD&q=85&s=9c700644ac7789bb180093029561ecd4/a/b/c.ts
import.meta.file; // => "c.ts"

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