title: How to properly declare a module for React and Require without Node?
body: <p>I'm attempting to learn React JS, and have finally managed reference external JSX from the HTML, but I'd like to have .js / .jsx file(s) to hold common code.  The idea is to have a page specific .js file that calls to a &quot;universal&quot; .js file that would supply JS / JSX.</p>
  <p>I added a React.js file as I couldn't find an official HTTP reference for it. and that solved a &quot;required not defined&quot; error, but a &quot;Module name &quot;Universal.js&quot; has not been loaded yet for context&quot; occurs when I attempt to import from the page specific .js.</p>
  <p>It would seem I'm forced to build a module so they babel code can read it.
  I made a plnkr here: <a href="https://plnkr.co/edit/PXu15yUsovMacP7R?preview" rel="nofollow noreferrer">https://plnkr.co/edit/PXu15yUsovMacP7R?preview</a></p>
  <p>My specific question is how do I designate Universal.js as a module so that Index.js can reference it?</p>
  <p>Code follows:
  Index.html:</p>
  <pre><code>&lt;html lang=&quot;en&quot;&gt;
      &lt;head&gt;
          &lt;script type=&quot;application/javascript&quot; src=&quot;https://unpkg.com/react@16.0.0/umd/react.production.min.js&quot;&gt;&lt;/script&gt;
          &lt;script type=&quot;application/javascript&quot; src=&quot;https://unpkg.com/react-dom@16.0.0/umd/react-dom.production.min.js&quot;&gt;&lt;/script&gt;
          &lt;script type=&quot;application/javascript&quot; src=&quot;https://unpkg.com/babel-standalone@6.26.0/babel.js&quot;&gt;&lt;/script&gt;
          &lt;script data-main=&quot;./&quot; src=&quot;./require.js&quot;&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;
      &lt;/body&gt;
      &lt;script type=&quot;text/babel&quot; src=&quot;Index.js&quot;&gt;&lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Index.js:</p>
  <pre><code>import './Universal.js';
  //require('./Universal');
  
  var vPage  = 0;
  var vLevel = 0;
  var vDivision = 0;
  
  var App = function() {
          return(
              getLogo(vLevel)
          )
      }
  ;
  
  var Primate = Monkey();
  
  ReactDOM.render(&lt;Primate /&gt;, document.getElementById('root'));
  </code></pre>
  <p>Universal.js:</p>
  <pre><code>function (Monkey) {
      return(
          &lt;div&gt;
              Ducks!
          &lt;/div&gt;
      )
  }
  </code></pre>