gertqin / vuex-class-modules

Typescript class decorators for vuex modules
MIT License
194 stars 20 forks source link

Vue Devtools not working #67

Closed reynard80 closed 3 years ago

reynard80 commented 3 years ago

I recently switched to class based Vuex modules with this package. However, the Vuex tab of Vue Devtools doesn't seem to work anymore. It just shows the base state and no modules or mutations are recorded.

Is this a known issue or just my project?

Knipsel

bodograumann commented 3 years ago

I don’t think this can have anything to do with vuex-class-modules, as it is just a wrapper around vuex. Could you please give the versions of vue, vuex and vue-devtools that you are using? It could very well be that there is some incompatibility therein. Beyond that, a minimal reproduction would be essential to even try to look at a possible issue.

reynard80 commented 3 years ago

I understand. It would be strange if vuex-class-modules was the issue, but before I used vuex-module-decorators in the same project and this was working (but had other issues).

We use Vue 2.6.14, Vuex 3.6.2 and Vue Devtools 5.3.4 in the project.

Only thing I can think of which might be a problem is that the modules are extended from abstract classes, like this:

AbstractEntityStore extends VuexModule {
  ...
}

AbstractDataTableStore extends AbstractEntityStore {
  ...
}

UserEntityStore extends AbstractDataTableStore {
  ...
}

export default new UserEntityStore({ store, name: 'userEntity' })

As for reproduction, I will try to create a scaffolding project with just this construct and see if it works.

bodograumann commented 3 years ago

Inheritance can be problematic, if i remember correctly. Maybe check #20.

reynard80 commented 3 years ago

It actually seems to be working now, also with inheritance. I actually had some settings wrong for Vue Devtools. Thanks for your reactions.