title: How can I fix this AMD path conflict?
body: <p>I am trying to use the <a href="http://help.arcgis.com/en/webapi/javascript/arcgis/" rel="nofollow">Esri ArgGis JavaScript API</a>, which is loaded by <a href="http://dojotoolkit.org/" rel="nofollow">Dojo</a>, using <code>dojo.require</code>. I have an existing modular <a href="http://requirejs.org/" rel="nofollow">AMD/requirejs</a> Typescript application that I need to integrate this code into. At the top of my initial TS file, I import several modules:</p>
  
  <pre><code>import tracer = module('../classes/trace');
  import pubsub = module('../classes/pubsub');
  import masker = module('../classes/masker');
  // etc.
  </code></pre>
  
  <p>This was working fine, but now that I have added the ArcGis code, instead of resolving the relative path within my application, require.js has picked up a baseUrl from the Esri site, and tries to load:</p>
  
  <pre><code>http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/classes/trace.js
  // etc.
  </code></pre>
  
  <p>Resulting in a string of 404 responses and script errors.</p>
  
  <p>How can I fix this?</p>
  
  <p>I've tried setting the requirejs baseUrl in the head of my html file before loading the first document that loads modules:</p>
  
  <pre><code> &lt;script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="/content/client/libs/require.js"&gt;&lt;/script&gt; &lt;!-- data-main="/content/client/hop/hop.app" --&gt;
   &lt;script type="text/ecmascript"&gt;
          require.config({
              baseUrl: "/Content/client/hop/"
          });
   &lt;/script&gt;
   &lt;script src="~/Content/client/hop/hop.app.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>But this fails, throwing an exception that require has no method config.</p>
  
  <p>(NB If I reverse the order in the head of the html document so that the arcgis api comes last in the load sequence then I get the opposite problem - my local files all work fine but dojo and the mapping api fail because they are looking for paths relative to my site when they should be searching on the argis server).</p>