本页还没有译文
本页 3 段还没译成한국어,下面显示的是英文原文。Check if the current file is the entrypoint
还没翻译译自英文(bun.com)本页 3 段都还没译
Bun provides a handful of module-specific utilities on the import.meta object. Use import.meta.main to check if the current file is the entrypoint of the current process.
if (import.meta.main) {
// this file is directly executed with `bun run`
} else {
// this file is being imported by another file
}See import.meta.
AI 翻译查看英文原文