Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
add stability, fix typos
  • Loading branch information
GeoffreyBooth committed Aug 13, 2023
commit a0ab43dbcbf6983580ad1e0e37b1ca2a9592a615
11 changes: 7 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ changes:
flagged.
-->

* `specifier` {string} The module specifier to resolve relative to `parent`.
> Stability: 1.2 - Release candidate

* `specifier` {string} The module specifier to resolve relative to the
current module.
* Returns: {string} The absolute (`file:`) URL string for the resolved module.

[`import.meta.resolve`][] is a module-relative resolution function scoped to
Expand All @@ -366,10 +369,10 @@ import.meta.resolve('./dep', import.meta.url);
> **Caveat** This can result in synchronous file-system operations, which
> can impact performance similarly to `require.resolve`.

Previously, Node.js implemented an asynchonous resolver which also permitted
Previously, Node.js implemented an asynchronous resolver which also permitted
a second contextual argument. The implementation has since been updated to be
synchronous, with the second contextual `parent` URL still accessible behind the
`--experimental-import-meta-resolve` flag:
synchronous, with the second contextual `parent` argument still accessible
behind the `--experimental-import-meta-resolve` flag:

* `parent` {string|URL} An optional absolute parent module URL to resolve from.

Expand Down