Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.
Closed
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
Next Next commit
doc: document import.meta.require
  • Loading branch information
MylesBorins committed Aug 22, 2018
commit b597a3ae86cf81ef74e6042c925b64bc25a40a6e
4 changes: 4 additions & 0 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ The `import.meta` metaproperty is an `Object` that contains the following
property:

* `url` {string} The absolute `file:` URL of the module.
* `require` {Function} To require CommonJS modules. This function enables
interoperability between CJS and ESM. See [`require()`]. None of the properties
generally exposed on require are available via `import.meta.require`.

### Unsupported

Expand Down Expand Up @@ -256,3 +259,4 @@ in the import tree.
[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md
[addons]: addons.html
[dynamic instantiate hook]: #esm_dynamic_instantiate_hook
[`require()`]: modules.html#modules_require