关于vue+webpack配置

基于node.js 、npm 安装

一、全局安装CNPM
npm install -g cnpm --registry=https://registry.npm.taobao.org

二、全局安装VUE-CLI脚手架
npm install vue -cli -g
查看VUE-CLI版本:cnpm view vue-cli

三、创建基于Webpakc模板的项目
E: – 进入E盘目录
E md 文件夹名称 – 新建文件夹
Cd 进入文件夹
$ vue init webpack 【项目名称】
一直回车即可,直至出现一下信息
Documentation can be found at https://vuejs-templates.github.io/webpack

四、进入项目,安装并运行
$ cd my-project
$ cnpm install
$ cnpm run dev
DONE Compiled successfully in 4388ms

Listening at http://localhost:8080

发布了8 篇原创文章 · 获赞 23 · 访问量 6263

猜你喜欢

转载自blog.csdn.net/weixin_45102071/article/details/93199865