ECMAScript modules are JavaScript source units with their own scope and explicit imports and exports. The ECMAScript specification defines their syntax and evaluation. The host environment supplies the mechanism for resolving module specifiers.[1][2]
Exports and imports
A module declares which names it exports. An importing module can bind a named export, a default export or a module namespace. The specification distinguishes import declarations from the dynamic import expression, which loads a module through a promise that resolves to its namespace.[1]
Loading and adoption
ECMAScript defines module records and how linked code is evaluated. The host interprets the requested module specifier and supplies the module being loaded. In a 2024 survey of JavaScript and TypeScript repositories and packages, Boris Cherny examined the coexistence of this module system with CommonJS.[1][2]
Connections
Discussed by
View connections on the graph
References
Revision history
- 2026-11-28 Publish sourced articles and connect reviewed subjects and dated records
58ff02f4b· View changes