title: Cannot load Dojo modules with RequireJs
body: <p>I think there is something I am missing. I have read that you can use dojo modules using RequireJS instead of using the Dojo loader. I'm semi comfortable with RequireJS and defining modules but I can't seem to figure out what is happening. I looked at the dojo js files and noticed that they were using define() just the same as when I declare my own modules. My files are organized like this</p>
  
  <pre><code>// File path
  -js
      main.js
      - lib
          .require.js
          -dojo
              // All dojo files
  </code></pre>
  
  <p>I'm not sure what I'm missing but when I attempt to load a Dojo module the value is undefined.
  Heres some sample HTML:</p>
  
  <pre><code>// index.html
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          // include require script &amp; set main.js
          &lt;script data-main="js/main" src="js/lib/require.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and a sample main.js file...</p>
  
  <pre><code>    // Sample main.js file
  
      // BaseUrl = js/
  
      require.config({
          packages : [
              name     : 'dojo',
              location : 'lib/dojo';
          ]
      });
  
      require(['dojo', 'dojo/dom'], function(dojo, dom) {
  
          // 'dojo'     should load dojo/main.js
          // 'dojo/dom' should load dojo/dom.js
  
          // But they have a value of "undefined" when I look at them in the console
          console.log(dojo);
      });
  </code></pre>
  
  <p>Any ideas what I'm doing wrong? as a side note sometimes I get this error in the console</p>
  
  <pre><code>TypeError: _3.add is not a function
  [Break On This Error]   
  
  _3.add("dom-addeventlistener",!!document.addEventListener);
  </code></pre>
  
  <p>Thanks in advance!</p>