title: Accessing Vuex store in Nuxt project from JS file
body: <p>In my Nuxt project I have a file named "apiAccess.js" in the root folder.  This file simply exports a bunch of functions that make Ajax calls to the server API.  This file is imported in any page that needs access to the server API.  I need to send a JWT token with each of these api requests, and I have stored that token in the Vuex store.</p>
  
  <p>I need to access the JWT token from the Vuex store within this "apiAccess.js" file.  Unfortuntaely, this.$store is not recognized within this file.  How do I access the Vuex store from within this file?  Or should I have done something differently?</p>
  
  <p>Here's a snippet from the apiAccessjs file where I try to access the store:</p>
  
  <pre><code>import axios from 'axios'
  const client = axios.create({
    baseURL: 'http://localhost:3000/api',
    json: true,
    headers: { Authorization: 'Bearer' + this.$store.state.auth.token }
  })
  </code></pre>