vue項目構建過於慢的問題

因爲 vue init 使用的是 npm源,是國外的

1.查看npm源

//查看源,可以看到設置過的所有的源
npm config get registry

2.設置npm源

//設置淘寶源
npm config set registry https://registry.npm.taobao.org
// 安裝cnpm命令,不會改變npm的源
npm install -g cnpm --registry=https://registry.npm.taobao.org

3 npm 安裝yarn

npm install -g yarn 

配置下yarn 源

yarn config set registry https://registry.npm.taobao.org -g

yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章