title: Webpack compiling ES6 into module
body: <p>I am trying to compile ES6 to a file using Webpack and can't figure out why the code is not usable as it is.</p>
  
  <blockquote>
    <p>Side note : This is meant to be a plugin for VueJS</p>
  </blockquote>
  
  <p>I start with a simple file that exports a single function such as </p>
  
  <pre><code>exports.install = () =&gt; {
    ...
  }
  </code></pre>
  
  <p>Webpack uses <code>babel-loader</code> and <code>babel-preset-es2015</code> to compile it.</p>
  
  <p>You may find webpack config, source and compiled files in <a href="https://gist.github.com/kartsims/dab115cc1755a503b79431eaff829963" rel="nofollow">this gist</a>.</p>
  
  <p>My problem is the result is not "requirable" in my Vue app... It has some weird stuff around the core needed <code>exports.install</code> statement. When I remove all this stuff and leave just <code>exports.install = ...</code> it is OK, otherwise I just don't get anything out of it.</p>
  
  <p>I am using it in another app built with webpack, through an <code>import</code> statement.</p>