title: browserify: concatenated browserified files => error _prelude.js vs. loading separate files work
body: <p>Running into a problem when concatenating two browserified files (vendor.js and app.js into combined.js)</p>
  
  <p>Loading combined.js in the browser throws the following in _prelude.js :</p>
  
  <pre><code>Uncaught Error: Cannot find module 'function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&amp;&amp;require;if(!u&amp;&amp;a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&amp;&amp;require;for(var o=0;o&lt;r.length;o++)s(r[o]);return s}'
  </code></pre>
  
  <p>while loading the browserified files individually works just fine.</p>
  
  <p>What am I missing?<br>
  (let me know if you need more config, happy to provide)  </p>
  
  <p>Thanks for your help!</p>
  
  <p>In Gruntfile.js:</p>
  
  <pre><code>browserify: {
          vendor: {
              src: ['client/requires/**/*.js'],
              dest: 'build/vendor.js',
              options: {
                  shim: {
                      jquery: {
                          path: 'client/requires/jquery/js/jquery.js',
                          exports: '$'
                      },
                      underscore: {
                          path: 'client/requires/underscore/js/underscore.js',
                          exports: '_'
                      },
                      backbone: {
                          path: 'client/requires/backbone/js/backbone.js',
                          exports: 'Backbone',
                          depends: {
                              underscore: 'underscore'
                          }
                      },
                      'backbone.marionette': {
                          path: 'client/requires/backbone.marionette/js/backbone.marionette.js',
                          exports: 'Marionette',
                          depends: {
                              jquery: '$',
                              backbone: 'Backbone',
                              underscore: '_'
                          }
                      },
                      eventsource: {
                          path: 'client/requires/eventsource/eventsource.js',
                          exports: 'EventSource'
                      },
                      moment: {
                          path: 'client/requires/moment/moment.js',
                          exports: 'moment'
                      },
                      bootstrap: {
                          path: 'client/requires/bootstrap/js/bootstrap.js',
                          exports: null
                      }
                  }
              }
          },
          app: {
              files: {
                  'build/app.js': ['client/src/main.js']
              },
              options: {
                  transform: ['node-underscorify'],
                  debug: true,
                  external: ['jquery', 'underscore', 'backbone', 'backbone.marionette', 'eventsource', 'moment', 'bootstrap']
              }
          },
      },
  
      concat: {
          'build/&lt;%= pkg.name %&gt;.js': ['build/vendor.js', 'build/app.js']
      },
  </code></pre>