title: RequireJs: Use autoloading-deps with shim
body: <p>I have defined a RequireJs configuration which defines paths and shims:</p>
  
  <pre><code>require.config({
      // define application bootstrap
      deps: ["main"],
  
      // define library shortcuts
      paths: {
          app: "app"
          , jquery: "lib/jquery"
          , underscore: "lib/underscore"
          , backbone: "lib/backbone"
          , bootstrap: "lib/bootstrap"
      },
  
      // define library dependencies
      shim: {
          jquery: {
              exports: "$"
          },
          underscore: {
              exports: "_"
          },
          backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
          },
          bootstrap: {
              deps: ['jquery'],
              exports: "bootstrap"
          },
  
          // main application
          app: {
              deps: ["backbone"],
              exports: "App"
          }
      }
  });
  </code></pre>
  
  <p>As you see the last "shim" declaration should make it able to access backbone (and it deps) when I load the main App(-namespace).</p>
  
  <p>In reality this doesn't work:</p>
  
  <pre><code>require(["app"], function($, _, Backbone, App){
      app.router = new Backbone.Router.extend({
          // routing and route actions
      });
  });
  </code></pre>
  
  <p>What makes me wondering is that in the "backbone-boilderplate"-project, Backbone (and its deps) are available this way:
  <a href="https://github.com/tbranyen/backbone-boilerplate/blob/master/app/main.js">https://github.com/tbranyen/backbone-boilerplate/blob/master/app/main.js</a></p>
  
  <p>The not even had to define this in the function.</p>
  
  <p>So what am I doing wrong?</p>