vue2与vue3的区别

一、vue2

安装命令:npm install -g vue-cli@2.9.6


初始化命令:vue init webpack demo2

初始化后文件列表:


启动的package.json的脚本:

"scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
    "start": "npm run dev",
    "unit": "jest --config test/unit/jest.conf.js --coverage",
    "e2e": "node test/e2e/runner.js",
    "test": "npm run unit && npm run e2e",
    "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs",
    "build": "node build/build.js"
  },


二、vue3

安装命令:npm install -g vue-cli

今天(2022-06-20)的版本:


初始化后文件列表:

初始的package.json文件的启动命令是这样:

  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },

文/程忠 浏览次数:0次   2022-06-20 17:12:50

相关阅读


评论:
点击刷新