How can I make Vuex 'invisible' in VueJS DevTools

Viewed 1286

There is a config option for vuejs to turn off inspection for the components. This is accessed through

Vue.config.devtools = false

When you set that code before initializing Vue, the user (or you) will not be able to inspect the components and you will get the following message vue devtools disabled

I am looking for a similar config for vuex because even with the Vue Js devtools turned off, I can still see the store including mutations and the ability to undo them which is something I don't want.

Is there a way to turn off vuex store inspection?

3 Answers
if (process.env.NODE_ENV === 'production') {
  Vue.config.devtools = false
  Vue.config.productionTip = false
}  

Adding the code above to app.js entry file and setting the environment with build tools solved my problem.

VueX store not detected in production as desired

Related