title: Global require with Browserify v2
body: <p>I want to use Browserify to bundle my files, but I then need to require one of the modules inside of my Browserify bundled <code>bundle.js</code> on the HTML page itself. This is currently not possible because there is no <code>require</code> function defined on the page.</p>
  
  <p>It appears that the <code>require</code> function defined by browserify in <code>bundle.js</code> is inside of an IIFE, so I can't use that. Is it possible to throw this one out in place of a global <code>require</code>?</p>
  
  <pre><code>&lt;script src="bundle.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    // Require the `app` module inside of `bundle.js`
    var app = require('app');
    app.start();
  &lt;/script&gt;
  </code></pre>
  
  <p>I need to do this because my <code>app.start</code> function requires some JSON is passed to it which can only be rendered by the server-side template.</p>
  
  <p>N.B. I am using Browserify v2.</p>