title: Uglifying a RequireJS/Backbone project into one single .js file?
body: <p>I worked along <a href="http://orizens.com/wp/topics/requirejs-optimizing-and-building-one-file/" rel="nofollow noreferrer">the following tutorial</a> to try to optimize my project into one single .js file, but unfortunately I can't seem to get the expected results. I get r.js to create an optimized folder for me, but instead of a single file, I get uglified copies of each individual .js file in their respective folders. Seems like that last concatenation step is somehow missing.</p>
  
  <p>I'm trying to leverage an existing config file instead of using paths, I don't know if that specific step is breaking it.</p>
  
  <p>My build/app.build.js is:</p>
  
  <pre><code>({
    appDir: '../',
    baseUrl: 'js',
    mainConfigFile: '../js/config.js',
    dir: '../../my-app-build',
    modules: [{
      name: 'main'
    }]
  })
  </code></pre>
  
  <p>My main.js file has the config file as its dependency:</p>
  
  <pre><code>require(["config"], function() {
    require(['underscore', [...]
      [...]
    }
  }
  </code></pre>
  
  <p>And the config file is where all of my project dependencies are declared:</p>
  
  <pre><code>require.config({
    baseUrl: "js",
    paths: {[...]},
    shim: {...]},
  });
  </code></pre>
  
  <p>Does anyone have insight into why I might not be getting that single file output that I'm looking for? I tried the other approach <a href="https://stackoverflow.com/questions/16256768/requirejs-optimizer-is-not-combing-files">in this post</a>, but that only ever produces main.js for me with the config file prepended to it.</p>
  
  <p>Thanks!</p>