title: Imported functions are undefined
body: <p>I am using Webpack via Vue CLI and am getting a <code>Error in created hook: "TypeError: _api__WEBPACK_IMPORTED_MODULE_0__.default.$_playerApi_getPlayers is not a function"</code> error when I try to use my page.</p>
  
  <p>Here is my tree structure:</p>
  
  <pre><code>.
  + main.js
  + app/
  |  + api.js
  |  + App.vue
  |  + players/
  |  |  + api.js
  |  |  + index.js
  |  |  + routes.js
  |  |  + components/
  |  |  |  + index.js
  |  |  |  + Login.vue
  |  |  |
  |  |  + vuex/
  |  |     + actions.js
  |  |     + ...
  |  |
  |  + others/
  |     + api.js
  |     + ...
  |
  + ...
  </code></pre>
  
  <p><em>app/players/vuex/actions.js</em>:</p>
  
  <pre><code>import { default as api } from '../../api'
  
  export default {
  
    loadPlayers({ commit }) {
      return api.$_playerApi_getPlayers().then(response =&gt; {  // &lt;--- ERROR LINE
        commit('STORE_PLAYERS', response.body)
        return response
      })
      .catch(error =&gt; {
        throw error
      })
    },
  
    loadPlayer({ commit }, playerId) {
      return api.$_playerApi_getPlayer(playerId).then(response =&gt; {
        commit('LOAD_PLAYER', response.data)
        return response
      })
      .catch(error =&gt; {
        throw error
      })
    },
  
    ...
  
  }
  </code></pre>
  
  <p><em>app/players/api.js</em>:</p>
  
  <pre><code>export default {
  
    ...
  
    $_playerApi_getPlayer(playerId = '') {
      ...
    },
  
    $_playerApi_getPlayers() {
      ...
    },
  
    ...
  
  }
  </code></pre>
  
  <p><em>app/api.js</em>:</p>
  
  <pre><code>import { api as players } from './players'
  
  export default {
    players,
  }
  </code></pre>
  
  <p>I'm pretty sure this is wrong (obv.) but am not sure how to get it to work properly.</p>
  
  <p>What am I doing wrong here? The exports and imports seem OK, but they're breaking somehow that I just can't see or debug.</p>
  
  <p>I've tried using the following in my <em>app/api.js</em> but this is wrong because the export is not an array:</p>
  
  <pre><code>import { api as players } from './players'
  
  export default {
    ...players,
  }
  </code></pre>
  
  <p>I've also tried using the following in my <em>app/players/api.js</em> but it didn't work, either:</p>
  
  <pre><code>export default {
  
    methods: {
  
      ...
  
      $_playerApi_getPlayer(playerId = '') {
        ...
      },
  
      $_playerApi_getPlayers() {
        ...
      },
  
      ...
  
    },
  
  }
  </code></pre>