Skip to content

Instantly share code, notes, and snippets.

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