title: Why does babel rewrite imported function call to (0, fn)(...)?
body: <p>Given an input file like</p>
  
  <pre class="lang-js prettyprint-override"><code>import { a } from 'b';
  
  function x () {
    a()
  }
  </code></pre>
  
  <p>babel will compile it to </p>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  var _b = require('b');
  
  function x() {
    (0, _b.a)();
  }
  </code></pre>
  
  <p>but when compiled in loose mode the function call is output as <code>_b.a();</code></p>
  
  <p>I've done some research into where the comma operator is added in the hope there was a comment explaining it.
  The code responsible for adding it is <a href="https://github.com/babel/babel/blob/91fb64eaf53c67a7ed7605aab71f8dcaa4d39ae2/packages/babel/src/transformation/modules/lib/remaps.js#L32">here</a>.</p>