title: Dynamically resolve paths with RequireJS
body: <p>Is there a way to dynamically resolve paths with RequireJS?  For example, is it possible to configure it so that, if I do</p>
  
  <pre><code>require(['mymodule'], function(mod){ });
  </code></pre>
  
  <p>some sort of function of mine will be called, with <code>"mymodule"</code> being passed as a parameter, and with the value I return therefrom being used by Require as the path to use for <code>mymodule</code>?</p>
  
  <hr>
  
  <p>I do understand that Require has some wonderful convention over configuration with respect to path resolution, and I also understand that paths can be manually configured.  But right now I'm trying to add in RequireJS to an old project that was written without Require in mind, so I'm trying to see what all of my options are.</p>