title: Uncaught SyntaxError: The requested module './add.js' does not provide an export named 'add'
body: <p>I am trying to learn ES6 imports and exports but I ran into an error that is not letting me import my module. I also tried <em>import .. from 'add.js'</em> without ./ but still no luck.</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: The requested module './add.js' does not provide
    an export named 'add'</p>
  </blockquote>
  
  <p>My folder structure looks like this</p>
  
  <pre><code>C:\xampp\htdocs\es6\import.export\
  - index.html
  - app.js
  - add.js
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script type="module" src="app.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>import { add } from './add.js'
  
  console.log(add(2,3))
  </code></pre>
  
  <p><strong>add.js</strong></p>
  
  <pre><code>export default function add (a, b) {
  // export default function (a, b) { &lt;-- does not work either, same error
      return a + b;
  }
  </code></pre>