title: Context and nested modules in requireJS
body: <p>I'm having a bit of trouble with contexts in requireJS.  What I'd like to is create a context, "mycontext", at the config stage (before I load any modules), and then have that context kept throughout.  This is complicated because I am unfortunately required (&lt;- ha!) to use the CommonJS syntax for my modules.  So, if this is my base file looks like this:</p>
  
  <p><strong>base.js</strong></p>
  
  <pre><code>contextReq = require.config({
      context: 'mycontext',
      baseUrl: 'http://www.example.com/src/',
      paths:{
          jquery: 'http://ajax.cdnjs.com/ajax/libs/jquery/2.0.3/jquery.min',
      },
  });
  
  (function(){
      contextReq(['require', 'topModule'], function(require, topModule){
          topModule.initialize();
      });
  })();
  </code></pre>
  
  <p>Then, I load topModule:</p>
  
  <p><strong><a href="http://www.example.com/src/topModule.js" rel="nofollow">http://www.example.com/src/topModule.js</a></strong></p>
  
  <pre><code>define(['require', 'jquery', 'nestedModule'], function (require) {
      var $ = require('jquery');
      var other = require('nestedModule');
  });
  </code></pre>
  
  <p>Will jQuery still be loaded only in mycontext?  What if I go a level further:</p>
  
  <p><strong><a href="http://www.example.com/src/nestedModule.js" rel="nofollow">http://www.example.com/src/nestedModule.js</a></strong></p>
  
  <pre><code>define(function (require) {
      var $ = require('jquery');
      var oneMore = require('someOtherModule');
  });
  </code></pre>
  
  <p>We already have access to jquery in this context, but will "someOtherModule" also be loaded in this context, or in the global "_" context?  Is there any way to check if a module is already loaded before I make the require call?</p>
  
  <p>Thanks!</p>