John Nguyen

Oh CommonJS! Why are you mESMing with me?

That `SyntaxError` in your tests isn't a bug. It's a signal to abandon legacy tools and embrace the smaller, faster bundles of pure ESM.

Oh CommonJS! Why are you mESMing with me?
#1about 6 minutes

A real-world conflict between CommonJS and ESM packages

An NPM package upgrade causes Jest tests to fail with a syntax error because an ESM-only dependency conflicts with Jest's CommonJS environment.

#2about 3 minutes

Understanding the origins of CommonJS and ESM modules

JavaScript module systems like CommonJS and ESM were created to manage growing codebases by allowing code to be split, shared, and reused.

#3about 1 minute

Examining the current landscape of module adoption

Statistics show that while CommonJS packages are still dominant, there is a clear and growing trend towards ESM adoption in the ecosystem.

#4about 3 minutes

Comparing unbundled CommonJS and ESM performance

An initial benchmark using the AWS SDK shows that the unbundled CommonJS implementation runs faster than its ESM counterpart.

#5about 2 minutes

How bundling reveals ESM's performance advantage

After bundling with esbuild, the ESM version is nearly half the size and runs significantly faster due to superior tree-shaking capabilities.

#6about 6 minutes

Why you should embrace an ESM-only future

ESM is the future due to smaller bundles, better performance, and its status as a web standard, making it a signal to modernize legacy dependencies.

Related jobs
Jobs that call for the skills explored in this talk.

Angular Developer

Picnic Technologies B.V.
Amsterdam, Netherlands

Intermediate
Senior

Software Engineer

tree-IT GmbH
Bad Neustadt an der Saale, Germany

Intermediate
Senior

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
Exploring TypeScript: Benefits for Large-Scale JavaScript Projects
JavaScript is the backbone of web development, powering everything from small websites to large-scale enterprise applications. However, as projects grow in complexity, maintaining JavaScript code can become increasingly difficult. This is where TypeS...
Exploring TypeScript: Benefits for Large-Scale JavaScript Projects
DC
Daniel Cranney
Dev Digest 188: CfP time, the risks of NPM and IKEA algorithms
Inside last week’s Dev Digest 188 . 🤖 GitHub Copilot CLI is now in public review 💻 Microsoft is bringing ‘vibe working’ to office apps 🎣 Attackers abuse AI tools to generate captchas in fishing attacks ⚠️ When LLMs autonomously attack 🧠 Common cause...
Dev Digest 188: CfP time, the risks of NPM and IKEA algorithms
CH
Chris Heilmann
Dev Digest 136 - No JS(on) of mine
News and ArticlesDouglas Crockford is our featured video, so let's talk about evolving JavaScript and all things JSON. Judicious JSON explains all the weird things in it, you can learn why it can be incredibly slow, people wonder what even is a JSON ...
Dev Digest 136 - No JS(on) of mine
CH
Chris Heilmann
Dev Digest 111 - npm i -g issues
In last Friday's Dev Digest we looked at some global tech issues, took a deep dive into code assistants, we have a great video about NPM security and want you to tell us your favourite code questions to use in CODE100. News and ArticlesLet's start th...
Dev Digest 111 - npm i -g issues

From learning to earning

Jobs that call for the skills explored in this talk.

TypeScript AWS Developer

TypeScript AWS Developer

TechShack
Charing Cross, United Kingdom

£156-182K
Senior
Terraform
TypeScript
Microservices
Amazon Web Services (AWS)
Creative Javascript

Creative Javascript

Thegiglab
Amsterdam, Netherlands

Intermediate
API
CSS
HTML
jQuery
Bootstrap
+1