UMD modules
Later on, the Universal Module Definition (UMD) (https://github.com/umdjs/umd) specification was created, aiming to create a bridge between AMD and CJS. The idea of this specification was to create modules capable of being loaded everywhere (that is, on the client and the server-side).
Since both AMD and CommonJS were popular, it was difficult to choose only one and make it the official standard. Ultimately, all these specifications provided the JavaScript community with more choice and cleaner ways to modularize code and thus avoid global variables and the script tags nightmare.
Although, there was still no standard solution or official language support for modules at that point, there weren't many tools to ease the pain either, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access