CommonJS is Bad for JavaScript and Xata Podcast with Domitrius Clark

CommonJS is Bad for JavaScript and Xata Podcast with Domitrius Clark

Newsletter

JSJam Live, Wednesday at 12pm PT

This week is another open mic on JavaScript Jam Live at 12PM PT. Follow us on Twitter to be notified when we go live! Last week, we discussed Million.js with Aiden Bai and Tobiloba Adedeji. We were also joined by Tejas Ravishankar who explained his new collaboration product called Dimension. You can listen to the Space recording here on the JavaScript Jam Podcast site.

JavaScript Jam | Talking with the Million.js team including Aiden Bai and Tobiloba Adedeji
Scott Steinlage, Anthony Campolo, and Ishan Anand host JavaScript Jam, a podcast and weekly Twitter Space for frontend and full-stack developers focusing on web performance, Jamstack, and the future of the Web.

Story of the Week

Deno team says CommonJS is hurting JavaScript

In a provocatively titled blog post on the Deno blog called CommonJS is Hurting JavaScript, Andy Jiang makes the case for an ecosystem wide migration away from CJS once and for all. Jiang argues the JS module system was necessary at the time because it accommodated the growing complexity of projects and need for modularization which helped developers manage large codebases.

However, its antiquated synchronous nature, difficulty with tree-shaking, and non-browser-native properties created inefficiencies, which in turn necessitated build steps or separate code writing for client and server. To address these issues, the TC39 committee introduced ECMAScript Modules with the ES6 language specification.

ESM supports asynchronous module loading, browser compatibility, static analysis, and tree shaking, making it more suitable for the web environment. However, due to the deep-rooted use of CommonJS in Node.js, the transition to ESM presented interoperability issues.

Even though Node.js has managed to support both CJS and ESM, the responsibility to maintain interoperability has fallen onto package authors. The article emphasizes the necessity of moving away from CommonJS in 2023 and transitioning completely to ESM for better developer experience and end-user performance.

Podcasts of the Week

One More Thing

Domitrius Clark is the (former) Head of Developer Experience at Xata.io. We spoke to him at RenderATL all about building developer communities and you can listen to the podcast here on our new JavaScript Jam podcast website. Since the recording of this podcast he has moved on to join Clerk as their Head of Developer Relations.

JavaScript Jam | Building Developer Communities with Domitrius Clark from Xata
Scott Steinlage, Anthony Campolo, and Ishan Anand host JavaScript Jam, a podcast and weekly Twitter Space for frontend and full-stack developers focusing on web performance, Jamstack, and the future of the Web.

JavaScript Jam on the Web

Find us online at the following links: