title: ES6 modules in the browser: Uncaught SyntaxError: Unexpected token import
body: <p>I'm new to <strong>ES6</strong> (ECMAScript 6), and I'd like to use its <strong>module system</strong> in the browser. I read ES6 is supported by Firefox and Chrome, but I'm getting the following error using <code>export</code></p>
  
  <p><code>Uncaught SyntaxError: Unexpected token import</code></p>
  
  <p>I have a test.html file</p>
  
  <pre><code>&lt;html&gt;
      &lt;script src="test.js"&gt;&lt;/script&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and a test.js file</p>
  
  <pre><code>'use strict';
  
  class Test {
  
      static hello() {
          console.log("hello world");
      } 
  }
  
  export Test;    
  </code></pre>
  
  <p>Why?    </p>