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

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.