title: "The requested module ' does not provide an export named 'default' " error, but only in relative import
body: <p>I have this api module from outside. When it is installed as a node_module (with npm install), then doing an import like this works:</p>
  <pre><code>import MyAPI from 'api'
  </code></pre>
  <p>However, when I look into the api folder in the node_modules and take out the api.js, which is entry point of the module, and do a relative import like this:</p>
  <pre><code>import MyAPI from './api.js'
  </code></pre>
  <p>Then I get the error:</p>
  <pre><code>&quot;The requested module ./api.js does not provide an export named 'default'&quot;
  </code></pre>
  <p>I have no control over how the api module is built. How can it work in one case but not another? This is Node 12.</p>