Skip to content

Instantly share code, notes, and snippets.

@pguillory
Created February 20, 2011 18:38
Show Gist options
  • Save pguillory/836188 to your computer and use it in GitHub Desktop.
Save pguillory/836188 to your computer and use it in GitHub Desktop.
// foo.js
console.log('foo');
require('bar').print();
//bar.js
exports.print = function() {
console.log('bar');
}
//bundled result
var __require_bar = (function() {
exports.print = function() {
console.log('bar');
}
return exports;
})();
console.log('foo');
__require_bar.print();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment