From 0bf7c99e4cc4a4df38bd87b11eb1a9ab292943a7 Mon Sep 17 00:00:00 2001 From: mukunda katta Date: Fri, 15 May 2026 13:36:23 -0700 Subject: [PATCH] doc: clarify bare specifier subpath examples --- doc/api/esm.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index ca1f9e804960..6a4fabdf6072 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -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 + [`"exports"`][] field. * _Absolute specifiers_ like `'file:///opt/nodejs/config.js'`. They refer directly and explicitly to a full path.