-
Vue预渲染卡在Building fresh packages...
- 2020-01-07 09:28
-
字数 649
- 阅读 208
最近学习 Vue.js,使用的是@vue/cli 4.1.0,需要对SPA进行SEO处理,采用prerender-spa-plugin及vue-meta-info方案。按一般步骤进行配置安装后,发现下载速度非常慢,同时在运行yarn build后,一直卡在Building fresh packages...
经过排查发现,是由于网络原因,可在项目根目录下新建.yarnrc文件,然后重新执行构建命令,.yarnrc文件内容如下:
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"