title: Importing functions in javascript
body: <p>Trying to use GoJS library I get an <strong>"import declarations may only appear at top level of a module"</strong> error.</p>
  
  <p><strong>main.html</strong></p>
  
  <pre><code>...
  &lt;script id = "code"&gt;
      import {makeNodes} from "./make_nodes.js";
  
      function init(){
         makeNodes(model);
         ...
      }
  &lt;/script&gt;
  
  &lt;body onload="init()"&gt;
  ...
  </code></pre>
  
  <p><strong>make_nodes.js</strong></p>
  
  <pre><code>export function makeNodes(model){
      ...
  }
  </code></pre>