title: requirejs + backbonejs + optimizer = backbone undefined
body: <p>Backbone doesn't get called in the indexview module.</p>
  
  <p>using requirejs 2.1.5/2.1.4 and backbonejs 0.9.10</p>
  
  <p>main.js after running r.js</p>
  
  <pre><code>...
  // this is causing the backbone to return 
  // null/undefined in the next define call below
  define("backbone", function(){}); 
  
  define('views/index/IndexView', [
      'underscore',
      'backbone',
      'text!templates/index/indexTemplate.html'  
  ], function(_, Backbone, indexTemplate){
  
      console.log(Backbone); // returns undefined
      var IndexView = Backbone.View.extend({
  ...
  </code></pre>
  
  <p>BUT if I take out the first define call that registers backbone as a module, everything
  works fine. but backbone-min.js gets loaded separately. but for now it's the only way
  to make the script run. I am definitely missing something here. </p>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>require.config({
      paths: {
          underscore  : 'libs/underscore/underscore-min',
          backbone    : 'libs/backbone/backbone-min'
          templates   : '../templates'
      },
      shim: {        
          'backbone': {
              deps: ['jquery','underscore'],
              exports: 'Backbone'
          }
      }
  });
  
  require(['app'], function(App){
      App.initialize();
  });
  </code></pre>
  
  <p><strong>build.js</strong></p>
  
  <pre><code>({
      appDir: "../",
      baseUrl: "js",
      dir: "../../build",
      optimize: "none",
      paths: {
          "jquery": "libs/requirejs/require-jquery",
          "underscore" : 'libs/underscore/underscore-min',
          "backbone": 'libs/backbone/backbone-min',
          "templates": '../templates',
      },
      modules: [
          {
              name: "main",
              exclude: ["jquery"]
          }
      ]    
  })
  </code></pre>
  
  <p>I'm still getting my feet wet with backbone and requirejs. 
  any feedback is much appreciated.</p>