在 64 位系统下安装 32 位 electron
为什么用 32 位 electron?
- 体积更小:32位 electron 比 64位小30MB,用 inno setup 打的安装包也要小10MB
- 更兼容:32位 版本兼容 64位系统
方式一:直接 npm 安装
npm install --arch=ia32 electron@1.4.14
方式二:配置 .npmrc
arch=ia32
registry=https://registry.npm.taobao.org
方式三:配置 package.json
{
"config": {
"arch": "ia32",
"registry": "https://registry.npm.taobao.org"
},
"devDependencies": {
"electron": "1.4.14"
}
}
一般我在配置项目的时候会使用方式二,推荐使用方式二或者方式三