Module systems in JavaScript and Node.js
Not all programming languages come with a built-in module system, and JavaScript lacked this feature for a long time after its inception.
When writing JavaScript code for the browser, it is possible to split the code base into multiple files and then import them by using different <script>
tags. For many years, this approach was good enough to build simple interactive websites, and JavaScript developers managed to get things done without having a fully-fledged module system.
Only when JavaScript browser applications became more advanced and frameworks like jQuery, Backbone, and AngularJS took over the ecosystem did the JavaScript community come up with several initiatives aimed at defining a module system that could be effectively adopted within JavaScript projects. The most successful ones were asynchronous module definition (AMD), popularized by RequireJS (nodejsdp.link/requirejs), and later universal module definition (UMD...