Skip to content

Instantly share code, notes, and snippets.

@pguillory
Created February 20, 2011 18:38
Embed
What would you like to do?
// 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