title: Module import or export statement unexpected here
body: <p>I have problem with importing JS scripts from code. I have a <code>canvas</code> game, and want to import my classes rather than define they in HTML. But when I run my code in Edge, it throws me an error.</p>
  
  <p>init.js</p>
  
  <pre><code>import {Tram} from "./tram/tram"
  
  var body;
  var curScreen = "menu";
  var canvas = document.createElement("canvas");
  canvas.width = 1920;
  canvas.height = 1080;
  var ctx = canvas.getContext("2d");
  var tex = {};
  var corrHeight = 
  loadTextures();
  
  window.onload = function () {
      body = document.body;
      body.appendChild(canvas);
  
      window.onclick = function () {
          if (body.requestFullscreen) {
              body.requestFullscreen();
          }
          else if (body.msRequestFullscreen) {
              body.msRequestFullscreen();
          }
          else if (body.mozRequestFullScreen) {
              body.mozRequestFullScreen();
          }
          else if (body.webkitRequestFullscreen) {
              body.webkitRequestFullscreen();
          }
      };
  
      mainLoop();
  };
  
  function updateCanvasRect() {
      canvas.width = brect.width;
      canvas.height = brect.height;
      var prop = 16 / 9;
      tex.sky.img.height = brect.height;
      tex.sky.img.width = brect.height * prop;
      tex.sky.patt = ctx.createPattern(tex.sky.img, "repeat-x");
  }
  
  function loadTextures() {
      tex.sky = importTexture("base/sky");
  }
  </code></pre>
  
  <p>I have following folder structure:</p>
  
  <pre><code>  ts2d/
      img/
        ...
      base/
        ...
        tram/
          tram.js
          ...
        init.js
        load.js
      main.js
      index.html
  </code></pre>