title: Module.exports and es6 Import
body: <p>React with babel. I have this confusion with imports and module.exports. I assume babel when converting the ES6 code to ES5 converts the imports and exports to require and module.exports respectively.</p>
  <p>If I export a function from one module and import the function in another module, the code executes fine. But if I export the function with module.exports and import using &quot;import&quot; the error is thrown at runtime saying it is not a function.</p>
  <p>I cooked up an example.</p>
  <pre class="lang-js prettyprint-override"><code>// Tiger.js
  function Tiger() {
      function roar(terrian){
          console.log('Hey i am in ' +  terrian + ' and i am roaing');
      };
      return roar;
  }
  
  module.exports = Tiger;
  
  // animal.js
  import { Tiger } from './animals';
  
  var animal = Tiger();
  animal(&quot;jungle&quot;);
  </code></pre>
  <p>I used babel with preset es2015 to transcompile it. This gives me the following error</p>
  <blockquote>
  <p><em>Uncaught TypeError: (0 , _animals.Tiger) is not a function</em></p>
  </blockquote>
  <p>But if I remove the <code>module.exports = Tiger;</code> And replace it with <code>export { Tiger };</code> It works fine.</p>
  <p>What am I missing here??</p>
  <p><strong>EDIT:</strong>
  I am using browserify as the module bundler.</p>