![]() ![]() Your trusty console is often the portal into performing this fantastic act of calculated magic.Ī bundle is the output of a process that merges everything into a few (if not single) file in the most optimized manner. Bundling tools like Webpack are merely repackaging up ECMAScript in a form that is much more efficient in terms of final produced file. It’s not concerned about human readability or comprehension, shortening your values and variables in places that it can. ‘Building’ a JavaScript application is more to do with minifying the current application and creating a streamlined output. The point of JavaScript is that it runs on the fly in the browser - efficiency is not part of the original equation. This isn’t like C++ or Java where you need to compile the program to make it work. There is no native way to ‘build’ a JavaScript application. Bundling like it’s a seamless and native thing Bundling tools deal with all that drama and packages things up, minify it for you and ensure that all the house keeping required to keep things working as expected. Now imagine having to figure out which one is needed and which one aren’t, and in what rendering context. It gets worse when you start adding libraries which have their own dependencies. Next thing you know, your entire page is littered with all the tiny little modules you wrote. This means that if you want to run your code, you’re going to need a bunch of script tags. Under normal circumstances, JavaScript is often used in the front end in conjunction with HTML and CSS. The point of modules is to give developers the ability to easily create modularity. It gives you the ability to use bits of code in one file and create code to be used in another. Modules is a method of organizing large bodies of code that allows for the developer to segment and mentally digest a particular part of the application. Sometimes, technology might seem like it’s moving fast but adaptation speed can sometimes be slow.īut before we continue on, what exactly are modules? ![]() ![]() Chrome, for example, implemented support in mid 2017, two years after modules was first released as a language feature. However, it took browsers a bit of time to catch up. JavaScript came out with the ability to use modules back in ES6. These bundling tools comes pre-baked into Angular and React CLIs. Bundling tools such as Webpack and Browsify organizes and puts all your JavaScript, HTML, CSS, images and everything else in between together in a handful of neat little files to help make your web application run smoothly. No one envisioned that it would one day take over the web and morph into a very special giant that needs a little bit of organization. But the first release was designed and created in 10 days. Don’t get me wrong, JavaScript is amazing. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |