From 73ce20162b6b00e78a4cf2053b3b1cae84b6714d 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 030c963f5764cf..6e8f703e5fd546 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