title: Require.js and r.js include all dependencies even of submodules
body: <p>I'm using require.js for the first time and all is working pretty for the moment. However, I started wanting to make a build. The idea is to create one file with ALL my js and templates. However, every time I use r.js it just includes the dependencies of my main module.</p>
  
  <p>here is my app.build.js:</p>
  
  <pre><code>({
  appDir: "public/javascripts",
  baseUrl: ".",
  dir: "build",
  paths: {
      "hbs": "lib/hbs",
      "jquery": "lib/jquery",
      "Handlebars": "lib/Handlebars",
      "Backbone": "lib/backbone",
      "underscore": "lib/underscore",
      "bootstrap": "lib/bootstrap.min.js"
  },
  modules: [{name: "main"}],
  shim: {
      "bootstrap": {
        deps: ["jquery"],
        exports: "$.fn.popover"
      },
      underscore: {
        exports: '_'
      },
      'Handlebars': {
        exports: 'Handlebars'
      },
      Backbone: {
        deps: ["underscore", "jquery"],
        exports: "Backbone"
      }
  }}) 
  </code></pre>
  
  <p>the beginning of main.js:</p>
  
  <pre><code>require.config({
   paths: {
      "hbs": "lib/hbs",
      "Handlebars": "lib/Handlebars",
      "Backbone": "lib/backbone",
      "underscore": "lib/underscore",
      "jquery": "lib/jquery",
      "bootstrap": "lib/bootstrap.min.js"
    },
    hbs: {
      disableI18n: true
    },
    shim: {
      "bootstrap": {
        deps: ["jquery"],
        exports: "$.fn.popover"
      },
      underscore: {
        exports: '_'
      },
      'Handlebars': {
        exports: 'Handlebars'
      },
      Backbone: {
        deps: ["underscore", "jquery"],
        exports: "Backbone"
      }
    }
  });
  
  require(['jquery', 'Backbone', 'videos'], function($, Backbone, Videos) { // Whatever });
  </code></pre>
  
  <p>In this case the final file created in my build 'main.js' only contains: jquery, underscore, backbone and videos. How can I make sure it also includes the dependencies of the module <code>videos</code> namely: the template 'hbs!template/videos/show'. How can I also make sure that bootstrap.min.js is also added even though it's not required anywhere?
  Finally should I remove the require.config as it will define paths that are not supposed to be anymore as all the modules are in the final file?  </p>