title: What is wrong with the export of my npm packaged vue component?
body: <p>I have a small local npm package (<code>fomantic-ui-vue</code>) whose main <code>js</code> is</p>
  
  <pre><code>import Vue from 'vue'
  // Import vue component
  import  button from './elements/button/button.vue'
  import  buttonGroup from './elements/button/button-group.vue'
  
  console.log('--------- package called begin ------------------');
  console.log('Register: '+button.name)
  Vue.component(button.name, button);
  console.log('Register: '+buttonGroup.name)
  Vue.component(buttonGroup.name, buttonGroup);
  console.log('--------- package called end ------------------');
  
  export const components = {
          button,
          buttonGroup,
      };
  export const test = () =&gt; {
      console.log('--------- TEST ------------------');
  };
  </code></pre>
  
  <p>In my test application I have</p>
  
  <pre><code>import FUI from '../../fomantic-ui-vue/dist/main.js'
  console.log(FUI)
  FUI.test()
  </code></pre>
  
  <ol>
  <li>The first line has to be somehow correct because in the browser shell I see <code>package called begin</code> and so on. </li>
  <li><code>console.log(FUI)</code> gives <code>{}</code>. Where are test and components?</li>
  <li>for <code>FUI.test()</code> I get the error <code>TypeError: _fomantic_ui_vue_dist_main_js__WEBPACK_IMPORTED_MODULE_2___default.a.test is not a function</code> Where the <code>a</code> comes from? what is wrong?</li>
  <li>If I comment <code>FUI.test()</code> out to avoid the error I get the error that the vue component <code>fue-button</code> is not registered, thus I conclude that the npm package registered it in some other place</li>
  </ol>
  
  <p>These are many errors but I think that they are all connected.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>const myTest = () =&gt; {
      console.log('--------- TEST ------------------');
  };
  
  export default {
      test: myTest,
      components: {
          button,
          buttonGroup
      }
  };
  </code></pre>