title: Vue.js or Nuxt.js centralized app configuration
body: <p>How can I load my static data in a single location within a nuxt/vue app? </p>
  
  <p>Ideally I would have a JSON file holding all this data which would get loaded into vuex and would be accessible anywhere...</p>
  
  <p>I've been suggested 2 options, but I don't find them clean...</p>
  
  <ul>
  <li>When using the webpack template (not webpack-simple), you can use environment variables for that: <a href="http://vuejs-templates.github.io/webpack/env.html" rel="nofollow noreferrer">http://vuejs-templates.github.io/webpack/env.html</a>.</li>
  <li>Alternatively, you can always just create some file - constants.js  - anywhere in your project folder, which you use to store your static data (e.g. <code>export const API_URL = 'https:/my-api.com'</code> ).</li>
  </ul>
  
  <p>Import the data from that file anywhere you need it (e.g. <code>import { API_URL } from 'path/to/constants'</code> ).</p>