Disable “development mode” warning in VueJS

前端 未结 3 1651
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 03:12

I\'m running Vue in development mode, and I get this message every time I load the page:

\"You are running Vue in development mode. Make sure to turn

相关标签:
3条回答
  • 2020-12-29 03:24

    As of Vue.JS 2.2.0 the development warning can be disabled as follows:

    Vue.config.productionTip = false
    

    should be added to main.js (or main.ts if using TypeScript)

    0 讨论(0)
  • 2020-12-29 03:35

    If you are using VueCli and package.json file like this:

    Then remove --mode development from line number 7 :

    Like this : "build": "vue-cli-service build"

    0 讨论(0)
  • 2020-12-29 03:39

    Open file app.js and add the next code

    Vue.config.productionTip = false
    

    Read more in Vue Api

    0 讨论(0)
提交回复
热议问题