Vue如何新建一个项目

Vue如何新建一个项目

  • 环境: Centos7.X

node 安装(略)

使用淘宝NPM 镜像

npm  install  -g  cnpm  --registry=https://registry.npm.taobao.org

安装 vue-cli

cnpm install vue-cli -g      //全局安装 vue-cli
(test001) [root@k3s-master test001]# vue -V && vue list 
2.9.6

  Available official templates:

    browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
    browserify-simple - A simple Browserify + vueify setup for quick prototyping.
    pwa - PWA template for vue-cli based on the webpack template
    simple - The simplest possible Vue setup in a single HTML file
    webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
    webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.

创建项目

修改启动端口和IP

测试

  • 浏览器访问: http://ip:8080

vue3

卸载系统残留 2 版本

创建项目

启动项目

Last updated