Skip to content

Commit c6b6e3f

Browse files
azzMylesBorins
authored andcommitted
doc: clarify required flag for extensionless esm
Fixes: #30655 PR-URL: #30657 Reviewed-By: Yorkie Liu <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 005cad3 commit c6b6e3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/esm.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ If the nearest parent `package.json` lacks a `"type"` field, or contains
8787
`"type": "commonjs"`, extensionless and `.js` files are treated as CommonJS.
8888
If the volume root is reached and no `package.json` is found,
8989
Node.js defers to the default, a `package.json` with no `"type"`
90-
field.
90+
field. "Extensionless" refers to file paths which do not contain
91+
an extension as opposed to optionally dropping a file extension in a specifier.
9192

9293
`import` statements of `.js` and extensionless files are treated as ES modules
9394
if the nearest parent `package.json` contains `"type": "module"`.

0 commit comments

Comments
 (0)