[Vuejs]-"vue running in developer mode" warning appears even when running in production mode

0👍

Check your build command under package.json file, the development mode is set in the build command. like so…

  "scripts": {
    "serve": "vue-cli-service serve",
    "devserve": "run-s build:dev watch",
    "lint": "vue-cli-service lint",
    "build": "vue-cli-service build --mode development",
}

I usually have two build commands configured, one to build for production and one for development

  "scripts": {
    "serve": "vue-cli-service serve",
    "devserve": "run-s build:dev watch",
    "lint": "vue-cli-service lint",
    "build:dev": "vue-cli-service build --mode development",
    "build:prod": "vue-cli-service build --mode production",
}

Make sure to run npm run build:prod for a production build and then deploy and the error should not appear.

Leave a comment