eejay73
10/29/2016 - 7:57 PM

JavaScript Module Systems Showdown: CommonJS vs AMD vs ES2015: The different JavaScript module systems currently in use, and find out which

JavaScript Module Systems Showdown: CommonJS vs AMD vs ES2015: The different JavaScript module systems currently in use, and find out which will be the best option for your project.

JavaScript Module Systems Showdown: CommonJS vs AMD vs ES2015

From: https://auth0.com/blog/javascript-module-systems-showdown/

As JavaScript development gets more and more common, namespaces and depedencies get much more difficult to handle. Different solutions were developed to deal with this problem in the form of module systems. In this post we will explore the different solutions currently employed by developers and the problems they try to solve


Conclusion

Building modules and handling dependencies was cumbersome in the past. Newer solutions, in the form of libraries or ES2015 modules, have taken most of the pain away. If you are looking at starting a new module or project, ES2015 is the right way to go. It will always be supported and current support using transpilers and polyfills is excellent. On the other hand, if you prefer to stick to plain ES5 code, the usual split between AMD for the client and CommonJS/Node for the server remains the usual choice. Don't forget to leave us your thoughts in the comments section below. Hack on!