Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
doc: document minimal kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
MylesBorins committed Oct 2, 2018
1 parent 4ebe563 commit 39c296d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<!--name=esm-->

Node.js contains support for ES Modules based upon the
[Node.js EP for ES Modules][].
[Node.js EP for ES Modules][] and the [ESM Minimal Kernel][].

Not all features of the EP are complete and will be landing as both VM support
and implementation is ready. Error messages are still being polished.
The minimal feature set is designed to be compatible with all potential
future implementations. Expect major changes in the implementation including
interoperability support, specifier resolution, and default behavior.

## Enabling

Expand Down Expand Up @@ -98,7 +99,7 @@ For now, only modules using the `file:` protocol can be loaded.

## CommonJS, JSON, and Native Modules

CommonJS, JSON, and Native modules can be used with [`module.createRequireFromPath()`][`module.createRequireFromPath()`].
CommonJS, JSON, and Native modules can be used with [`module.createRequireFromPath()`][].

```js
// cjs.js
Expand Down Expand Up @@ -266,3 +267,4 @@ in the import tree.
[Node.js EP for ES Modules]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md
[dynamic instantiate hook]: #esm_dynamic_instantiate_hook
[`module.createRequireFromPath()`]: modules.html#modules_module_createrequirefrompath_filename
[ESM Minimal Kernel]: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md

0 comments on commit 39c296d

Please sign in to comment.