Skip to content

Commit

Permalink
doc: fix explanation of package.json "type" field
Browse files Browse the repository at this point in the history
Remove erroneous reference to files with `.mjs` extension, which are not
affected by the package.json "type" field.
  • Loading branch information
tamias committed Dec 31, 2019
1 parent baa3621 commit fccd01b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/esm.md
Expand Up @@ -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
Expand Down

0 comments on commit fccd01b

Please sign in to comment.