配置如下:

用法:

vue-cli-service serve [options] [entry]

选项:

  --open    在服务器启动时打开浏览器
  --copy    在服务器启动时将 URL 复制到剪切版
  --mode    指定环境模式 (默认值:development)
  --host    指定 host (默认值:0.0.0.0)
  --port    指定 port (默认值:8080)
  --https   使用 https (默认值:false)

完整配置

"scripts": {
    "serve": "vue-cli-service serve",
    "dev": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "build:prd": "vue-cli-service build --no-clean",
    "build:test": "vue-cli-service build --no-clean --mode test",
    "lint": "vue-cli-service lint"
}

image.png

文档地址


Tom_Li
26 声望1 粉丝

热爱学习,热爱总结,热爱广博知识