美文网首页
新建vue项目(mac)

新建vue项目(mac)

作者: fanren | 来源:发表于2021-02-25 10:01 被阅读0次

一、安装vue

  • 安装vue-cli npm install vue-cli -g

  • 验证是否安装成功 vue list

二、配置vue

  • 切换镜像 npm config set registry [https://registry.npm.taobao.org](https://registry.npm.taobao.org/)
  • 查询当前镜 npm config get registry

国内推荐使用淘宝镜像,否则在使用npm install下载资源库文件时,会特变的慢;

三、新建vue项目

1.使用webpack直接创建

  • 新建test项目 vue init webpack test
  • 下载资源库 npm install
  • 运行 cd test; npm run dev
  • 浏览器上查看,使用浏览器打开http://localhost:8081

2.使用脚手架(CLI)创建

创建方式

四、项目配置

  • 安装插件dayjsnpm install --save dayjs
    截图

相关文章

网友评论

      本文标题:新建vue项目(mac)

      本文链接:https://www.haomeiwen.com/subject/oueyfltx.html