Skip to content

Commit

Permalink
doc: document import.meta.require
Browse files Browse the repository at this point in the history
  • Loading branch information
MylesBorins committed Jun 28, 2018
1 parent c503b5c commit bf9a18c
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit bf9a18c

Please sign in to comment.