One big file, with batteries included. There's even a good practice rule saying that you should put all your JavaScript code in one file when you send it over the web to the client side. And for good reason.
But this is also one of the reasons why JavaScript got a slightly bad reputation: the developer's code looked pretty much like the production code. The only other "compilation" beside concatenation JavaScript code got before hitting the client side was minification, uglyfying. This compilation is a huge resource gain for the client side but it is also seen as another reason why JavaScript "sucks".
That's refreshing, right? If only my JavaScript code could be more like that? Oh, but it can! CommonJS or AMD or browserify or ES6 modules to the rescue!
Your new post is loading...