title: ReactJS: Uncaught ReferenceError: require is not defined
body: <p>I'm trying to use DRY in React JS. I'm trying to use the same HTML partial in different files</p>
  
  <p>partial:</p>
  
  <pre><code>var AdminMenu = React.createClass({
   getInitialState: function() {
     return {};
   },
   render: function() {
     return (
       &lt;h1&gt;Menu&lt;/h1&gt;
     );
   }
  });
  </code></pre>
  
  <p>I'm requeiring it in another file:</p>
  
  <pre><code>require('./scripts/adminMenu.js');
  
  ReactDOM.render(
   &lt;AdminMenu/&gt;,
   document.getElementById('content')
  );
  </code></pre>
  
  <p>But I'm getting an error:</p>
  
  <pre><code>Uncaught ReferenceError: require is not defined
  </code></pre>
  
  <p>this scripts are included on html page like:
  <code>&lt;script type="text/babel" src="scripts/admin.js"&gt;&lt;/script&gt;</code></p>
  
  <p>I'm using webpack</p>