Skip to content

Commit be28376

Browse files
iguessitsokaytargos
authored andcommittedMay 1, 2021
doc: add command flag to import.meta.resolve
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 <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent c00c31c commit be28376

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎doc/api/esm.md

+3
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ const buffer = readFileSync(new URL('./data.proto', import.meta.url));
274274
275275
> Stability: 1 - Experimental
276276
277+
This feature is only available with the `--experimental-import-meta-resolve`
278+
command flag enabled.
279+
277280
* `specifier` {string} The module specifier to resolve relative to `parent`.
278281
* `parent` {string|URL} The absolute parent module URL to resolve from. If none
279282
is specified, the value of `import.meta.url` is used as the default.

0 commit comments

Comments
 (0)