Bun

指南工具

使用 Bun 取得目前檔案的目錄

Bun 在 import.meta 物件上提供一些特定於模組的工具。

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

請參閱 文件 > API > import.meta 以取得完整的說明文件。