title: accessing vuex store in js file
body: <p>Just like in main.js, I'm trying to access my store from a helper function file:</p>
  
  <pre><code>import store from '../store'
  
  let auth = store.getters.config.urls.auth
  </code></pre>
  
  <p>But it logs an error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'getters' of undefined.</p>
  </blockquote>
  
  <p>I have tried</p>
  
  <pre><code>this.$store.getters.config.urls.auth
  </code></pre>
  
  <p>Same result. </p>
  
  <p>store:</p>
  
  <pre><code>//Vuex
  import Vue from 'vue'
  import Vuex from 'vuex'
  
  Vue.use(Vuex);
  
  const store = new Vuex.Store({
      state: {
          config: 'config',
  
      },
      getters: {
          config: state =&gt; state.config
      },
  });
  
  export default store
  </code></pre>
  
  <p>How do I make my store available outside of components?</p>