title: Require JS is ignoring my config
body: <p>I'm having pretty simple directory structure for scripts:</p>
  
  <pre><code>/js/        &lt;-- located in site root
      libs/
          jquery-1.10.1.min.js
          knockout-2.2.1.js
          knockout.mapping.js
      models/
          model-one.js
          model-two.js
          ...
      require.js
      config.js
  </code></pre>
  
  <p>Since the site engine uses clean URLs I'm using absolute paths in <code>&lt;script&gt;</code>:</p>
  
  <pre><code>&lt;script type="text/javascript" data-main="/js/config.js" src="/js/require.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>RequireJS config:</p>
  
  <pre><code>requirejs.config({
  
      baseUrl: "/js/libs",
  
      paths: {
          "jquery":       "jquery-1.10.1.min",
          "knockout":     "knockout-2.2.1",
          "komapping":    "knockout.mapping"
      }
  
  });
  </code></pre>
  
  <p>Somewhere in HTML:</p>
  
  <pre><code>require(["jquery", "knockout", "komapping"], function($, ko, mapping){
      // ...
  });
  </code></pre>
  
  <p>So the problem is that RequireJS completely ignores <code>baseUrl</code> and <code>paths</code> defined in config file. I get 404 error for every module required in the code below. I see in browser console that RequireJS tries to load these modules from <code>/js/</code> without any path translations:</p>
  
  <pre><code>404: http://localhost/js/jquery.js
  404: http://localhost/js/knockout.js
  404: http://localhost/js/komapping.js
  </code></pre>
  
  <p>However after the page is loaded and the errors are shown I type in console and...</p>
  
  <pre><code>&gt; require.toUrl("jquery")
    "/js/libs/jquery-1.10.1.min"
  </code></pre>
  
  <p>Why so? How to solve this problem?</p>
  
  <p>It's my first experience using RequireJS, so I'm feeling like I've skipped something very simple and obvious. Help, please.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Just discovered this question: <a href="https://stackoverflow.com/questions/12574255/require-js-ignoring-baseurl">Require.js ignoring baseUrl</a></p>
  
  <p>It's definitely my case. I see in my Network panel that <code>config.js</code> is not completely loaded before <code>require(...)</code> fires own dependency loading.</p>
  
  <p>But I don't want to place my <code>require(...)</code> in config because it is very specific for the page that calls it. I've never noticed such problem with asynchronicity in any example seen before. How do authors of these examples keep them working?</p>