Skip to content

Commit

Permalink
doc: add command flag to import.meta.resolve
Browse files Browse the repository at this point in the history
import.meta.resolve is only available under
--experimental-import-meta-resolve cli flag.

Source:
https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/modules/esm/translators.js#L132

PR-URL: #38171
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
iguessitsokay authored and targos committed May 1, 2021
1 parent c00c31c commit be28376
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url));
> Stability: 1 - Experimental
This feature is only available with the `--experimental-import-meta-resolve`
command flag enabled.
* `specifier` {string} The module specifier to resolve relative to `parent`.
* `parent` {string|URL} The absolute parent module URL to resolve from. If none
is specified, the value of `import.meta.url` is used as the default.
Expand Down

0 comments on commit be28376

Please sign in to comment.