How do I turn off the productionTip warning in Vue 3?
Andrew Mclaughlin
In Vue 2 one could use
Vue.config.productionTip = false;to turn off the productionTip warning on development builds. However it doesn't work with Vue 3:
Vue.config && (Vue.config.productionTip = false);
const App = { data: () => ({ foo: 'bar' })
};
Vue.createApp(App).mount('#app');<script src=""></script>
<div>{{ foo }}</div> 1 3 Answers
According to documentation it was removed.
So, if you want to get rid of the warning in your Vue 3 Stack Overflow answers (without disabling the console in the snippet), you have to replace src="" with a global.prod CDN build: (i.e: src=""):
const App = { data: () => ({ foo: 'bar' })
};
Vue.createApp(App).mount('#app');<script src=""></script>
<div>{{ foo }}</div> 0 productionTip has been defaulted to false for production in Vue 3.x. It's now only for dev. Check Vuejs official documentation.
1write this
const app = createApp(App)
app.config.warnHandler = function (msg, vm, trace) { return null
}Done!
1