championswimmer / vuex-module-decorators

TypeScript/ES7 Decorators to create Vuex modules declaratively
https://championswimmer.in/vuex-module-decorators/
MIT License
1.8k stars 170 forks source link

Can't use static and dynamic modules together #250

Open alecgibson opened 4 years ago

alecgibson commented 4 years ago

Unless I'm missing something, I can't seem to use static and dynamic modules together. That is, if I do something like this:

const store = new Vuex({
  modules: {ModuleA},
});

export default store;

with a dynamic module loaded later in the load order:

import store from './store';

@Module({name: 'B', namespaced: true, dynamic: true, store})
export default class ModuleB extends VuexModule {
  // module definition
}

... then ModuleB (dynamic) breaks ModuleA (static)

As far as I can tell, this is something to do with:

BerthaPeng commented 2 years ago

is this solved? I also have this problem