.npmrc文件

-

.npmrc文件,就是npm的配置文件。当然,寻找这个文件的目的,多数是为了修改.npmrc文件内容。

一、修改.npmrc文件

npm config edit

二、查看.npmrc配置内容

npm config ls -l

三、查看npm的缓存目录

npm config get cache

 

在项目根目录.npmrc文件设置镜像

// 普通包来源
registry=https://registry.npmmirror.com
// 设置范围包的来源,以@test开头的包从xxx那里下载
@test:registry=xxx

 

 

 

 

-

posted @ 2022-07-13 23:52  古墩古墩  Views(2163)  Comments(0Edit  收藏  举报