No Vuex store detected in Vue Dev Tools

此生再无相见时 提交于 2019-12-10 17:53:01

问题


For very specific reasons, I have set the vue dev tools to true in production.

Vue.config.devtools = true

Am using the following versions:

"vue": "^2.5.2"
"vuex": "^3.0.1"
"vuetify": "^1.0.0"

While I can see the components and events, the Vuex store is not detected.

I have tried downgrading the vuex version to 2.3.1 and 2.4.x, but it did not help. Here's the link I referred to - https://github.com/vuejs/vue-devtools/issues/405

Note - The store works well, its just that I am not able to view it in the Vue dev tools.

Any pointers is appreciated.


回答1:


you have to set Vue.config.devtools = true before you create the store.

here my store.js:

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
Vue.config.devtools = true

export const store = new Vuex.Store({
  state: {
    counter: 0
  }
})


来源:https://stackoverflow.com/questions/50974348/no-vuex-store-detected-in-vue-dev-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!