We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.npmrc 是 npm 配置文件,可以通过修改配置项对 npm 做配置
.npmrc
npm
🌰: 修改镜像源
registry=https://registry.npmmirror.com
# 查看所有配置 npm config ls [-l|--json] # 查看配置 npm config get <key> #OR npm get <key> # 查看配置 npm config delete <key> # 修改配置 npm config set <key> <value> #OR npm set <key> <value> # 编辑配置文件 npm config edit [-g|--global]
配置说明
npmrc
npm config get userconfig
npm config get prefix
.yarnrc
.yarnrc.yml
在 yarn 1 中如果同时存在 .yarnrc 和 .npmrc 文件时, .npmrc 优先级高于 .yarnrc 当我们使用 yarn 1 时项目只需要配置 .npmrc 文件
yarn 1
pnpm 使用 .npmrc 文件
The text was updated successfully, but these errors were encountered:
No branches or pull requests
.npmrc 学习笔记
.npmrc
是npm
配置文件,可以通过修改配置项对npm
做配置配置说明
配置读取顺序
npmrc
文件)npm config get userconfig
查看文件位置)npm config get prefix
查看文件位置)其他包管理器
yarn
.yarnrc
和.npmrc
文件.yarnrc.yml
文件(不再使用.yarnrc
和.npmrc
)踩坑点
在
yarn 1
中如果同时存在.yarnrc
和.npmrc
文件时,.npmrc
优先级高于.yarnrc
当我们使用
yarn 1
时项目只需要配置.npmrc
文件pnpm
pnpm 使用
.npmrc
文件The text was updated successfully, but these errors were encountered: