ECMAScript modules in Node.js
Node.js fully supports ECMAScript modules as they are currently specified. [S1]
ESM support
Node.js fully supports ECMAScript modules as they are currently specified. [S1]
Relation to CommonJS
CommonJS modules are the original way to package JavaScript code for Node.js. [S2]
Node.js also supports the ECMAScript modules standard used by browsers. [S2]
Claims
- id: C1 claim: Node fully supports ESM. source: S1 evidence: "Node.js fully supports ECMAScript modules as they are currently specified"
- id: C2 claim: CommonJS was the original packaging style. source: S2 evidence: "CommonJS modules are the original way to package JavaScript code for Node.js."
- id: C3 claim: Each file is treated as a module. source: S2 evidence: "In Node.js, each file is treated as a separate module."
- id: C4 claim: ESM is also used by browsers. source: S2 evidence: "ECMAScript modules standard used by browsers"
Sources
- [S1] Modules: ECMAScript modules. Node.js. https://nodejs.org/api/esm.html . License: MIT. Accessed 2026-11-06.
- [S2] Modules: CommonJS modules. Node.js. https://nodejs.org/api/modules.html . License: MIT. Accessed 2026-11-06.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Copyright Node.js contributors. MIT (https://github.com/nodejs/node/blob/main/LICENSE).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Node.js docs, Modules: ECMAScript modules, MIT; Node.js docs, Modules: CommonJS modules, MIT.
Cite this
iinventedlight. 2026. "ECMAScript modules in Node.js." iinventedlight Library, iil:note:cw5amhsy, version of 2026-11-06. https://iinventedlight.com/library/notes/node-esm/. License: CC-BY-4.0.
@misc{iil_note_cw5amhsy,
author = {{iinventedlight}},
title = {{ECMAScript modules in Node.js}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-06},
url = {https://iinventedlight.com/library/notes/node-esm/},
note = {Permanent ID iil:note:cw5amhsy. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/node-esm.md.