yarn3 笔记

1,736 阅读1分钟

配置

.yarnrc.yml

# 自定义 registy
npmRegistryServer: 'https://registry.npm.taobao.org'

# 解除 https 访问限制
unsafeHttpWhitelist: npm.company.com

# 指定包 registy
# 例如 @midea/xxx
npmScopes:
  midea:
    npmRegistryServer: http://npm.company.com

# 指定使用 yarn 版本
# yarnPath: .yarn/releases/yarn-3.1.0.cjs

# 配置 node-sass (开头好像要空格才行,原因不明)
  SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"


有时终端会卡住 不清楚 node-sass 是否编译完成,可以到 node_modules/node-sass/vendor/win*-x64/ binding.node 文件生成,一般有的话是已经完成的了。