Features
February 9, 2020 · View on GitHub
This document has been archived.
As part of creating the ECMAScript Modules implementation for Node.js 12.0.0, use cases were brainstormed, which led to a list of features. This feature list, which previously existed as a section in this repo's root README, informed what became the plan for the implementation.
Features
Based on these use cases (#55), our implementation aims to support the following features (subject to change):
Baseline Modules Implementation Features:
Browser Interop:
- Browser and Node compatibility without building (#107)
- Browser-compatible specifier resolution (#109)
- Browser-compatible builds for ESM and CommonJS (#108)
CommonJS Interop:
- 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)
Existing Node.js Utility Features:
- Importing non-JavaScript files (#115)
- NodeJS contextual pathing use cases (#121)
- ESM in executable files (#152)
- Callable resolver (#157)
Loader Features:
- 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 Features:
- WASM modules (#106)