CommonJS Is Hurting JavaScript

JavaScript, the reigning champion of web development, is facing a formidable adversary: its own outdated module system, CommonJS. CommonJS was introduced to handle larger JavaScript projects that expanded beyond the browser to the server. However, it comes with its own set of issues, such as synchronous module loading, difficulty in tree-shaking, and reliance on bundlers and transpilers for client-side functionality. In 2013, the TC39 committee began working on ECMAScript modules, a successor to CommonJS, built into the JavaScript language itself. Despite this, Node.js, the dominant server-side JavaScript runtime, continues to support both CommonJS and ECMAScript modules, causing interoperability problems. It’s time to embrace an all ECMAScript module future and bid farewell to CommonJS.

https://deno.com/blog/commonjs-is-hurting-javascript

To top