Skip to content

Commit a386114

Browse files
azzBridgeAR
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 cc8c0b4 commit a386114

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
@@ -84,7 +84,8 @@ If the nearest parent `package.json` lacks a `"type"` field, or contains
8484
`"type": "commonjs"`, extensionless and `.js` files are treated as CommonJS.
8585
If the volume root is reached and no `package.json` is found,
8686
Node.js defers to the default, a `package.json` with no `"type"`
87-
field.
87+
field. "Extensionless" refers to file paths which do not contain
88+
an extension as opposed to optionally dropping a file extension in a specifier.
8889

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

0 commit comments

Comments
 (0)