node.js style require and export in the browser