RequireJS
RequireJS is a JavaScript file and module loader that implements the Asynchronous Module Definition (AMD) API. It is designed to load JavaScript modules asynchronously in the browser, manage dependencies, and minimize code that runs before it is ready. By using AMD, modules declare their dependencies and are executed in the correct order once loaded, helping to avoid global namespace pollution.
In practice, modules are defined with define([dependencies], factory) and loaded with require([dependencies], callback). A loader script,
Key features include configuration of paths to map module names to URLs, shim to integrate non-AMD scripts
A production workflow often uses the r.js optimizer to bundle and minify modules into a single file,