From 94492424ba47c691050861e2f31e73bf1544b08f Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 2 Apr 2022 20:29:22 +0200 Subject: [PATCH] doc: add introduction sentence for CJS PR-URL: https://github.com/nodejs/node/pull/42491 Reviewed-By: Geoffrey Booth Reviewed-By: Akhil Marsonya --- doc/api/modules.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index de17eea503cb5c..0264c4ff558fe1 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -6,7 +6,11 @@ -In the Node.js module system, each file is treated as a separate module. For +CommonJS modules are the original way to package JavaScript code for Node.js. +Node.js also supports the [ECMAScript modules][] standard used by browsers +and other JavaScript runtimes. + +In Node.js, each file is treated as a separate module. For example, consider a file named `foo.js`: ```js