Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLucas Azzola <derflatulator@gmail.com>2019-11-26 14:30:11 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2020-01-03 18:12:05 +0300
commita3861147e53993cdee9a2dba2f62499f999c52ff (patch)
tree1ffc763c175bb68bc956a50738cad5b49d22c29e /doc
parentcc8c0b4cdea6617f0fe839ad30023c747c2ef83c (diff)
doc: clarify required flag for extensionless esm
Fixes: https://github.com/nodejs/node/issues/30655 PR-URL: https://github.com/nodejs/node/pull/30657 Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/esm.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md
index 5245cef465e..85f7b2d28dd 100644
--- a/doc/api/esm.md
+++ b/doc/api/esm.md
@@ -84,7 +84,8 @@ If the nearest parent `package.json` lacks a `"type"` field, or contains
`"type": "commonjs"`, extensionless and `.js` files are treated as CommonJS.
If the volume root is reached and no `package.json` is found,
Node.js defers to the default, a `package.json` with no `"type"`
-field.
+field. "Extensionless" refers to file paths which do not contain
+an extension as opposed to optionally dropping a file extension in a specifier.
`import` statements of `.js` and extensionless files are treated as ES modules
if the nearest parent `package.json` contains `"type": "module"`.