Skip to content

Commit 77a36af

Browse files
committed
chore: 配置国内淘宝源
1 parent 536cb86 commit 77a36af

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.npmrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
# 请在安装依赖和打包时自行切换这两份配置!
2+
3+
# 解决国内用户 yarn 安装依赖时失败的问题
4+
# ELECTRON_MIRROR = https://npmmirror.com/mirrors/electron/
5+
# ELECTRON_BUILDER_BINARIES_MIRROR = https://npmmirror.com/mirrors/electron-builder-binaries/
6+
17
# 解决国内用户 build 打包时下载依赖失败的问题
2-
ELECTRON_MIRROR = https://npmmirror.com/mirrors/electron/
3-
ELECTRON_BUILDER_BINARIES_MIRROR = http://npmmirror.com/mirrors/electron-builder-binaries/
4-
# 这里的版本号务必和 package.json 中保持同步,且这里的版本号前面必须有一个字符 'v',不然打包会出现 404 找不到资源的情况
5-
ELECTRON_CUSTOM_DIR = "v17.0.1"
8+
ELECTRON_MIRROR = https://npmmirror.com/mirrors/electron/v
9+
ELECTRON_BUILDER_BINARIES_MIRROR = https://npmmirror.com/mirrors/electron-builder-binaries/v

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
> .npmrc 中 ELECTRON_CUSTOM_DIR 和 package.json 中 electron 的版本号必须同步
1+
> 国内环境在安装依赖和打包时,需要切换 .npmrc 文件中的镜像源配置
22
33
## ⚡️ 简介
44

0 commit comments

Comments
 (0)