Skip to content

La proprietà Bun.main contiene il percorso assoluto al punto di ingresso corrente.

ts
console.log(Bun.main);
ts
import "./foo.ts";

Il percorso stampato corrisponde al file che viene eseguito con bun run.

sh
bun run index.ts
txt
/path/to/index.ts
sh
bun run foo.ts
txt
/path/to/foo.ts

Vedi Docs > API > Utils per altre utilità utili.

Bun a cura di www.bunjs.com.cn