Vue3 change port

Change the default port 8080 to 8000:

Find the ' scripts ' attribute in  the package.json file, and add    --port 8000 to serve

Before change:


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

After change:

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

That'll be fine

Guess you like

Origin blog.csdn.net/m0_53574149/article/details/129082550