yarnrc or mpmrc

 前端项目中安装某些依赖包需要科-学-上-网,  如果手头没有合适的工具会造成安装依赖非常慢, 此时我们可以借助 .yarnrc.npmrc 配置指定包的镜像地址来加速下载.

 

.yarnrc or .npmrc

 .yarnrc 文件允许你配置更多的 Yarn 功能。 也可以用 config 命令来配置这些选项。 Yarn 会把你的 .yarnrc merge 进文件树里。

 

常用配置如下:

registry "https://registry.npm.taobao.org"

sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
phantomjs_cdnurl "http://cnpmjs.org/downloads"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"

  

posted @ 2020-08-26 15:19  Dream_It_Possible  阅读(992)  评论(0编辑  收藏  举报