From fccd01ba4a873dafb68091b7e1b75a029801c432 Mon Sep 17 00:00:00 2001 From: Ronald J Kimball Date: Wed, 1 May 2019 08:27:27 -0500 Subject: [PATCH] doc: fix explanation of package.json "type" field Remove erroneous reference to files with `.mjs` extension, which are not affected by the package.json "type" field. --- doc/api/esm.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index 939965842833d8..463650ab3d439c 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -59,9 +59,9 @@ or when referenced by `import` statements within ES module code: ### `package.json` `"type"` field -Files ending with `.js` or `.mjs`, or lacking any extension, -will be loaded as ES modules when the nearest parent `package.json` file -contains a top-level field `"type"` with a value of `"module"`. +Files ending with `.js` or lacking any extension will be loaded as ES modules +when the nearest parent `package.json` file contains a top-level field `"type"` +with a value of `"module"`. The nearest parent `package.json` is defined as the first `package.json` found when searching in the current folder, that folder’s parent, and so on up