Shiver My Timbers! Migrating yargs to ECMAScript Modules - Benjamin Coe, Google
Channel: OpenJS Foundation
Date: 2021-06-02

Shiver My Timbers! Migrating yargs to ECMAScript Modules - Benjamin Coe, Google

The ECMAScript Modules standard has existed for 11 years, but it was only in April 2020 that the Node.js implementation was marked stable. Up until this point, it was difficult for the npm community to truly adopt modules, given the importance of Node.js to JavaScript tooling. Stability declared, library authors can now start thinking about a future that includes modules. ECMAScript Modules create exciting possibilities for library authors: it's now possible to target multiple JavaScript platforms, such as Deno, Node.js, and the modern web; modules have a separate loading step, making it possible to perform optimizations like tree shaking; and, they're standards backed. In this talk, Ben provides a recipe for releasing libraries that support both CommonJS (require statements) and ECMAScript modules (import and export statements), based on their experience migrating the library yargs.

Join the speaker for live Q&A on Slack: Thursday, June 3 from 11:00 - 11:20 PDT / 20:00 - 20:20 CEST, channel - #openjs_world-development