title: Syntax error: import declarations may only appear at top level of a module
body: <p>i'm trying to import a function from 'test.js' in 'index.js'</p>
  
  <p>test.js: </p>
  
  <pre><code>var testFunction = function test(){ alert("hello World") }
  
  export testFunction
  </code></pre>
  
  <p>in the very top of 'index.js' i tried the following statement:</p>
  
  <pre><code>import testFunction from './test.js'
  </code></pre>
  
  <p>now i've got the following error in my firefox console, when i'm running my index.html file in the browser:</p>
  
  <p>SyntaxError: import declarations may only appear at top level of a module (in line 1)</p>