Vue cli 项目搭建

安装Node

官网:https://nodejs.org/zh-cn/

安装是否成功: node-v npm-v

Vue脚手架安装

npm install -g @vue/cli

安装是否成功:vue -V 

npm unistall vue-cli -g 卸载, 安装高版本需要先卸载低版本

脚手架构建项目

  1. vue create xxxxx
  2. 选择Babel,Router,Vuex,Linter,css Pre-processors
  3. history mode 带 #
  4. 配置css编译器随便选, 这里选 sass/scss(with node-sass)
  5. linter/formtter 选择 eslint+prettier
  6. additional lint features: lint on save
  7. 单独开配置文件保存配置:In dedicated config files

猜你喜欢

转载自www.cnblogs.com/Jason1019/p/13400715.html