title: Nuxt + Vuex - How do I break down a Vuex module into separate files?
body: <p>In the Nuxt documentation (<a href="https://nuxtjs.org/guide/vuex-store/#module-files" rel="noreferrer">here</a>) it says 'You can optionally break down a module file into separate files: <code>state.js</code>, <code>actions.js</code>, <code>mutations.js</code> and <code>getters.js</code>.'</p>
  
  <p>I can't seem to find any examples of how this is done - lots of breaking down the Vuex store at the root level into <code>state.js</code>, <code>actions.js</code>, <code>mutations.js</code> and <code>getters.js</code>, and into individual module files, but nothing about breaking the modules themselves down.</p>
  
  <p>So currently I have:</p>
  
  <pre><code>     ├── assets
       ├── components
       └── store
             ├── moduleOne.js
             ├── moduleTwo.js
             └── etc...
  </code></pre>
  
  <p>And what I would like to have is:</p>
  
  <pre><code>     ├── assets
       ├── components
       └── store
             └── moduleOne
                   └── state.js
                   └── getters.js
                   └── mutations.js
                   └── actions.js
             └── moduleTwo
                  └── etc...
  </code></pre>
  
  <p>To try this out, in <code>/store/moduleOne/state.js</code> I have:</p>
  
  <pre><code>export const state = () =&gt; {
      return {
          test: 'test'
      }
  };
  </code></pre>
  
  <p>and in <code>/store/moduleOne/getters.js</code> I have:</p>
  
  <pre><code>export const getters = {
      getTest (state) {
          return state.test;
      }
  }
  </code></pre>
  
  <p>In my component I'm accessing this with <code>$store.getters['moduleOne/getters/getTest']</code></p>
  
  <p>However using the debugger and Vue devtools, it seems like state isn't accessible in the getters file - it seems to be looking for a state in the local file, so <code>state.test</code> is undefined.</p>
  
  <p>Attempting to import <code>state</code> from my <code>state.js</code> file into my <code>getters.js</code> file doesn't seem to work either.</p>
  
  <p>Does anyone have an example of how they've managed to break the store down like this in Nuxt?</p>