File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -366,16 +366,20 @@ import.meta.resolve('./dep');
366366All features of the Node.js module resolution are supported. Dependency
367367resolutions are subject to the permitted exports resolutions within the package.
368368
369- > **Caveat** This can result in synchronous file-system operations, which
370- > can impact performance similarly to ` require .resolve ` . This feature is not
371- > available within custom loaders (it would create a deadlock).
369+ **Caveats**:
372370
373- Previously, Node.js implemented an asynchronous resolver which also permitted
374- a second contextual argument. The implementation has since been updated to be
375- synchronous, with the second contextual ` parent` argument still accessible
376- behind the ` -- experimental- import -meta-resolve` flag:
371+ * This can result in synchronous file-system operations, which
372+ can impact performance similarly to ` require .resolve ` .
373+ * This feature is not available within custom loaders (it would
374+ create a deadlock).
375+
376+ **Non-standard API**:
377+
378+ When using the ` -- experimental- import -meta-resolve` flag, that function accepts
379+ a second argument:
377380
378381* ` parent ` {string|URL} An optional absolute parent module URL to resolve from.
382+ **Default:** ` import.meta.url`
379383
380384## Interoperability with CommonJS
381385
You can’t perform that action at this time.
0 commit comments