Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ There are three types of specifiers:
is always necessary for these._

* _Bare specifiers_ like `'some-package'` or `'some-package/shuffle'`. They can
refer to the main entry point of a package by the package name, or a
specific feature module within a package prefixed by the package name as per
the examples respectively. _Including the file extension is only necessary
for packages without an [`"exports"`][] field._
refer to the main entry point of a package by the package name, or to a
package subpath by appending the subpath to the package name. Examples include
`'some-package/shuffle'` for a subpath exported by the package, and
`'some-package/shuffle.js'` for a file subpath in a package without an
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's being required, the extensionless path works too. only import forces extensions absent an exports field.

[`"exports"`][] field.

* _Absolute specifiers_ like `'file:///opt/nodejs/config.js'`. They refer
directly and explicitly to a full path.
Expand Down
Loading