title: vuex - cannot dispatch action from another module
body: <p>I split my vuex store to different modules. when i try to dispatch actionA that is defined in module A from a module B's action I get the following error in console:</p>
  
  <p><em>actionA undefined</em></p>
  
  <p>I assume this means i did not configure or imported something correctly, but for the life of me i can't figure out what exactly. some pseudo code for reference:</p>
  
  <p>store.js: </p>
  
  <pre><code>import Vue from 'vue';
  import Vuex from 'vuex';
  import moduleA from './modules/moduleA';
  import moduleB from './modules/moduleB';
  Vue.use(Vuex);
  
  export default new Vuex.Store({
      namespaced: true,
      modules: { 
          moduleA,
          moduleB
      },
      state: { ...
      },
      getters: { ...
      },
      mutations: { ...
      },
  
  </code></pre>
  
  <p>moduleA.js: </p>
  
  <pre><code>import Vue from 'vue';
  import axios from 'axios';
  
  export default {
  namespaced: true,
      state: { 
          devices: [],
          devices_id: []
      },
      getters: { ...
      },
      mutations: { ...
      },
      actions: { ...
           async actionA(context) {
           },
           ...other actions...
      }
  }
  </code></pre>
  
  <p>moduleB.js:</p>
  
  <pre><code>import Vue from 'vue';
  
  export default {
  namespaced: true,
      state: { 
          user_attr: null,
          user_tokens: null,
          signedIn: false
      },
      getters: { ...
      },
      mutations: { ...
      },
      actions: {
           actionB(context) {
                &lt;some logic...&gt;
                context.dispatch('moduleA/actionA', null, { root: true }); // THE LINE IN QUESTION
           },
           ...other actions...
      }
  }
  </code></pre>
  
  <p>I am using vue-cli and dispatching actionB from Vue.app the following way in beforeCreate() hook: 
  <code>this.$store.dispatch('moduleB/actionB');</code></p>
  
  <p>actionB is running fine until it hits the line in question above. 
  the "undefined" tells me i am either doing something wrong in the dispatch of actionA or missed some other basic configuration of a moduled store.
  to be clear, i kept some state objects, getters and mutations in the store.js main file as well, but moving these elsewhere does not solve the issue.</p>
  
  <p>Any help would be appreciated.</p>