title: Exportin/importing javascript modules
body: <p>Nooby question:
  I've got file main.js with module <code>let myModule = {}</code>, defined there inside <code>$(document).ready(function()</code>. And I have another file summary.js where I would like to use it. I declare them all in the head of html file:</p>
  <pre><code>&lt;script src=&quot;js/main.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;js/summary.js&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>I would like to use myModule module in the summary.js file and extend it. So I would like to be able to define: myModule.summary = {}. For now I receive the error <code>myModule is undefined</code> even though all js files are uploaded correctly (I can see them in debugger in dev console of the browser). I expect I have to export the mdrx module somehow but export default mdrx at the end of main.js does not do the job. How to do it correctly? I read the documentation but it seems like structural problem as I couldn't figure that out. Can that be that the myModule is not loaded yet before loding summary.js? If so how to prevent that?</p>