Skip to main content

Get the file name of the current file

还没翻译译自英文(bun.com)本页 3 段都还没译

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.

import.meta.file; // => "c.ts"

See import.meta.

翻訳 © 2026 fanyi.dev · 原文 © 2026 the Bun project (LICENSE.md names no copyright holder) (MIT)