Until now, JavaScript has not had an official module system defined as part of the language, although it has had several unofficial ones, including Node.js’s CommonJS module system. JavaScript developers have nearly universally adopted Node.js as the platform of choice for their tooling. Web application frameworks all use command-line tools written in Node.js, pulling shared code from the npm registry to build applications that run on the browser. While CommonJS modules do not work in the browser, bundling tools like browserify and webpack have allowed CommonJS modules to be built into browser-ready code.
But JavaScript in browsers has a new module system: ES modules. With the arrival of browser support for ES modules, developers now expect to be able to write ESM code and have it work everywhere. Early implementations of ES modules rely on the CommonJS module system under the hood with Babel transpiling ESM syntax into CommonJS syntax. The two module systems are incompatible in several interesting ways, but Babel has hidden the differences.
Join CJ Silverio to explore ES modules and learn what’s new, what you need to know about how to use the new system, and what you need to know to use all the JavaScript that already exists from your new code.
CJ Silverio is the CTO of npm. Her work allows JavaScript developers all over the world to share code and build modern web applications.
For exhibition and sponsorship opportunities, email fluent@oreilly.com
For information on trade opportunities with O'Reilly conferences, email partners@oreilly.com
View a complete list of Fluent contacts
©2018, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • confreg@oreilly.com