Skip to content

기본 레지스트리는 registry.npmjs.org 입니다. 이는 bunfig.toml 에서 전역적으로 구성할 수 있습니다.

toml
[install]
# 문자열로 기본 레지스트리 설정
registry = "https://registry.npmjs.org"
# 토큰 설정
registry = { url = "https://registry.npmjs.org", token = "123456" }
# 사용자 이름/비밀번호 설정
registry = "https://username:password@registry.npmjs.org"

특정 조직에 한정된 비공개 레지스트리를 구성하려면:

toml
[install.scopes]
# 문자열로 레지스트리
"@myorg1" = "https://username:password@registry.myorg.com/"

# 사용자 이름/비밀번호가 있는 레지스트리
# 환경 변수를 참조할 수 있습니다.
"@myorg2" = { username = "myusername", password = "$NPM_PASS", url = "https://registry.myorg.com/" }

# 토큰이 있는 레지스트리
"@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" }

.npmrc

Bun 은 .npmrc 파일도 읽습니다. 자세히 알아보기

Bun by www.bunjs.com.cn 편집