DEV Community

Discussion on: JavaScript Modules: From IIFEs to CommonJS to ES6 Modules

Collapse
 
emgodev profile image
Michael • Edited

I hate reading this: "You'll notice that there's a lot of magic going on there", even if it's only acknowledging it may be something the reader does not understand, don't give them an excuse to remain ignorant. There is always a reason and explanation for why or how something works. We should stop saying anything is magic.

"There is obviously a lot going on here and the internal workings of module systems is another topic, but we can see webpack has a design that internalizes our code in an IIFE of it's own", this would have been a great replacement, or since you sort of say this later in a similar way, just remove the magic bit. It offers zero credit.