diff --git a/doc/api/esm.md b/doc/api/esm.md index 1a85b57ceee19e..1fdfd8c247b111 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -33,9 +33,9 @@ initial input, or when referenced by `import` statements within ES module code: * Files ending in `.mjs`. -* Files ending in `.js`, or extensionless files, when the nearest parent - `package.json` file contains a top-level field `"type"` with a value of - `"module"`. +* Files ending in `.js`, or extensionless files when run as main entry points on + the command line, when the nearest parent `package.json` file contains a + top-level field `"type"` with a value of `"module"`. * Strings passed in as an argument to `--eval` or `--print`, or piped to `node` via `STDIN`, with the flag `--input-type=module`. @@ -50,9 +50,9 @@ or when referenced by `import` statements within ES module code: * Files ending in `.cjs`. -* Files ending in `.js`, or extensionless files, when the nearest parent - `package.json` file contains a top-level field `"type"` with a value of - `"commonjs"`. +* Files ending in `.js`, or extensionless files when run as main entry points on + the command line, when the nearest parent `package.json` file contains a + top-level field `"type"` with a value of `"commonjs"`. * Strings passed in as an argument to `--eval` or `--print`, or piped to `node` via `STDIN`, with the flag `--input-type=commonjs`.