The Node.js Modules Team maintains and actively develops the ECMAScript Modules (ESM) implementation in Node.js Core.
Work includes:
- ESM Loader implementation
- ESM Module Specifier Resolution Algorithm
- Loader Hooks
- ESM and CommonJS Interoperability
- Node.js and Browser interoperability
- VM Modules implementation
A new ECMAScript modules implementation shipped behind the --experimental-modules
flag in Node.js 12.0.0. The flag was dropped in Node.js 13.2.0, although the implementation remains experimental and is still subject to change. A road map of the implementation’s development is here.
Based on these use cases (#55), our implementation aims to support the following features (subject to change):
- Browser and Node compatibility without building (#107)
- Browser-compatible specifier resolution (#109)
- Browser-compatible builds for ESM and CommonJS (#108)
- Named exports when importing CJS (#81)
- Multi-mode packages (#94)
- Transparent interoperability for ESM importing CommonJS (#100)
- Consumer-agnostic imports (#105)
- Mixed module types within app/module; gradual migration from CommonJS to ESM (#99)
- ESM in .js files (#151)
- Importing non-JavaScript files (#115)
- NodeJS contextual pathing use cases (#121)
- ESM in executable files (#152)
- Callable resolver (#157)
- Code coverage/instrumentation (#95)
- Pluggable Loaders to support multiple use cases (#82)
- Runtime loaders, transpilation at import time (#96)
- Arbitrary sources for module source text (#97)
- Mock modules (injection) (#98)
- Specifier resolution customization (#110)
- Package encapsulation (#111)
- Conditional imports (#113)
- WASM modules (#106)
- File / path / URL resolving (#103)
- Import CommonJS without needing asynchronous syntax (#116)
- Tree shaking (#102)
- Polyfillability (#101)
- @bmeck - Bradley Farias
- @DanielRosenwasser - Daniel Rosenwasser
- @devsnek - Gus Caplan
- @GeoffreyBooth - Geoffrey Booth
- @guybedford - Guy Bedford
- @jkrems - Jan Olaf Krems
- @ljharb - Jordan Harband
- @MylesBorins - Myles Borins
- @robpalme - Rob Palmer
- @SMotaal - Saleh Abdel Motaal
- @targos - Michaël Zasso
- @weswigham - Wesley Wigham
- @A-lxe - Alex Aubuchon
- @benjamingr - Benjamin Gruenbaum
- @benjamn - Ben Newman
- @bmacnaughton - Bruce MacNaughton
- @bmeurer - Benedikt Meurer
- @bizob2828 - Bob Evans
- @ceejbot - C J Silverio
- @chrisdickinson - Chris Dickinson
- @clarkbw - Bryan Clark
- @coreyfarrell - Corey Farrell
- @darcyclarke - Darcy Clarke
- @dduleone - Dan DuLeone
- @DerekNonGeneric - Derek Lewis
- @devamaz - Ahmad Abdul-Aziz
- @devongovett - Devon Govett
- @eugeneo - Eugene Ostroukhov
- @evanplaice - Evan Plaice
- @Fishrock123 - Jeremiah Senkpiel
- @giltayar - Gil Tayar
- @hiroppy - Yuta Hiroto
- @iarna - Rebecca Turner
- @inidaname - Hassan Sani
- @jamiebuilds - Jamie Kyle
- @jasnell - James M Snell
- @jdalton - John-David Dalton
- @justinfagnani - Justin Fagnani
- @linclark - Lin Clark
- @manekinekko - Wassim Chegham
- @mcollina - Matteo Collina
- @mduleone - Matt DuLeone
- @mhdawson - Michael Dawson
- @refack - Refael Ackermann (רפאל פלחי)
- @robwormald - Rob Wormald
- @rubys - Sam Ruby
- @ryzokuken - Ujjwal Sharma
- @sendilkumarn - Sendil Kumar N
- @soldair - Ryan Day
- @tbjers - Torgny Bjers
- @tbranyen - Tim Branyen
- @TheLarkInn - Sean Larkin
- @TimothyGu - Timothy Gu
- @tzmanics - Tara Z. Manicsic
- @WebReflection - Andrea Giammarchi
- @XadillaX - Khaidi Chu
- @xtuc - Sven Sauleau
- @yosuke-furukawa - Yosuke Furukawa
- @zackschuster - Zack Schuster
- @zenparsing - Kevin Smith