本文主要是介绍2023最新vue安装(npm,yarn,国内镜像,vue安装,vue导包)全套教程2023年12月最新,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
第一步(安装npm)
官网地址:https://nodejs.org/en/download
windows安装yarn 详细教程_windows yarn-CSDN博客
第二步(yarn下载)
windows 下需要下载msi文件 ,下载地址:https://yarnpkg.com/latest.msi
npm install -g yarn
安装完成后,你可以测试下自己的版本
yarn --version
第三步(国内镜像)
1、设置淘宝镜像源 npm config set registry https://registry.npm.taobao.org/
2、查看镜像使用状态: npm config get registry
如果返回https://registry.npm.taobao.org/,说明配置的是淘宝镜像。
如果要在设置成官网npm config set registry https://registry.npmjs.org
第四步(使用npm下载vue)
使用npm下载vue
vue npm i @vue/cli -g
查看vue版本
vue -version
第五步(导入bootstrap依赖)
npm install bootstrap
main.js导包
import 'bootstrap/dist/css/bootstrap.css' //引用bootstrap的样式
import 'bootstrap/dist/js/bootstrap.min.js' //引用bootstrap的js
这篇关于2023最新vue安装(npm,yarn,国内镜像,vue安装,vue导包)全套教程2023年12月最新的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!