Skip to content

La propriété Bun.main contient le chemin absolu du point d'entrée actuel.

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

Le chemin affiché correspond au fichier exécuté avec bun run.

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

Consultez Docs > API > Utils pour plus d'utilitaires utiles.

Bun édité par www.bunjs.com.cn