From b61ff831f251f2d378bb83e53bb8afffc5376b63 Mon Sep 17 00:00:00 2001 From: Ferdi Date: Fri, 9 Apr 2021 18:28:13 +0100 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/38171 Reviewed-By: Darshan Sen Reviewed-By: James M Snell --- doc/api/esm.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/esm.md b/doc/api/esm.md index bd8fbe0721c77c..98b26bc7c36acd 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -283,6 +283,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.