title: Access module.exports from external file
body: <p>I would like to view the contacts of a function from an external file.</p>
  
  <p>MarionetteJS app.js file:</p>
  
  <pre><code>module.exports = functionToAccess = (function(superClass) {
    extend(functionToAccess, superClass);
  
    function functionToAccess() {
      this.doSomething = bind(this.doSomething, this);
      return functionToAccess.__super__.constructor.apply(this, arguments);
    }
  
    functionToAccess.prototype.defaults = {
      someProperty: 'some value',
      anotherProperty: 'another value',
      canAccessThis: false,
      wouldIlikeTo: true
    };
  
    [...]
  
    return functionToAccess;
  
  })(Wrapper);
  </code></pre>
  
  <p>In an external PHP file, I am trying to alert or console.log the contents of <em>anything</em> from the above file, but preferably the <code>functionToAccess</code> function.</p>
  
  <p>External JS script inside PHP file:</p>
  
  <pre><code>// Using the RequireJS CDN here resolves 'require is undefined'
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
  var testFileLoad = require(['path/to/app'], function() {
  
  });
  
  console.log(testFileLoad);
  </code></pre>
  
  <p>This returns a <code>localRequire</code> function. How can I instead return <code>functionToAccess</code>?</p>