What the heck are CJS, AMD, UMD, and ESM in Javascript?
In the beginning, Javascript did not have a way to import/export modules. This is a problem. Imagine writing your app in just one file - it would be nightmarish! Then, people much, much smarter than me attempted to add modularity to Javascript. Some of them are CJS, AMD, UMD, and ESM.
https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm