This is an issue that I’ve seen a lot of confusion over, and even seasoned JavaScript developers might have missed some of its subtleties. So I thought it was worth a short tutorial. Let’s say you have a JavaScript module that you want to publish to npm, available both for Node and for the browser.
Full article