summaryrefslogtreecommitdiff
path: root/doc/api/esm.md
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2017-11-29 19:15:47 -0600
committerAnna Henningsen <anna@addaleax.net>2017-12-13 06:32:55 +0100
commit11ebaff15c39e87aa2850b43847627aff8e6f62e (patch)
tree3c1874924bb8735bf4911043937d4329b48bcc22 /doc/api/esm.md
parenta2bdcbab5fea61b67f0614a0573e5ac5c2ffe004 (diff)
downloadandroid-node-v8-11ebaff15c39e87aa2850b43847627aff8e6f62e.tar.gz
android-node-v8-11ebaff15c39e87aa2850b43847627aff8e6f62e.tar.bz2
android-node-v8-11ebaff15c39e87aa2850b43847627aff8e6f62e.zip
doc: import() is supported now
PR-URL: https://github.com/nodejs/node/pull/17395 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/esm.md')
-rw-r--r--doc/api/esm.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md
index b812d7cb76..ef9adbdc73 100644
--- a/doc/api/esm.md
+++ b/doc/api/esm.md
@@ -33,15 +33,14 @@ node --experimental-modules my-app.mjs
### Supported
Only the CLI argument for the main entry point to the program can be an entry
-point into an ESM graph. In the future `import()` can be used to create entry
-points into ESM graphs at run time.
+point into an ESM graph. Dynamic import can also be used with the flag
+`--harmony-dynamic-import` to create entry points into ESM graphs at run time.
### Unsupported
| Feature | Reason |
| --- | --- |
-| `require('./foo.mjs')` | ES Modules have differing resolution and timing, use language standard `import()` |
-| `import()` | pending newer V8 release used in Node.js |
+| `require('./foo.mjs')` | ES Modules have differing resolution and timing, use dynamic import |
| `import.meta` | pending V8 implementation |
## Notable differences between `import` and `require`