Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable "development mode" warning in VueJS

Tags:

vue.js

vuejs2

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 on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html"

Is there a way to disable it without switching to production mode?

like image 930
ierdna Avatar asked Jan 19 '17 14:01

ierdna


People also ask

How do I turn off Vue components?

Vue Button component can be enabled/disabled by giving disabled property. To disable Vue Button component, the disabled property can be set as true .

How do you turn off input on Vue?

We can disable inputs conditionally with Vue 3 by setting the disabled prop to the condition when we want to disable the input. We have the input with the disabled prop set to the disabled reactive property. Below that, we have the @click directive to toggle the disabled reactive property when we click the button.

How do you conditionally disable a button in Vue?

To conditionally disable a button element in Vue. js, you can dynamically bind the disable attribute to an expression that evaluates to boolean true (to disable the button) or false (to enable the button). Please note that :disable is a shorthand syntax for writing v-bind:disable .


2 Answers

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)

like image 120
ierdna Avatar answered Oct 26 '22 20:10

ierdna


Open file app.js and add the next code

Vue.config.productionTip = false 

enter image description here

Read more in Vue Api

like image 45
Vladimir Salguero Avatar answered Oct 26 '22 22:10

Vladimir Salguero