From 977fb13bd52da1425666f3226966005a7b5bf456 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Wed, 29 Nov 2017 19:15:47 -0600 Subject: [PATCH] doc: import() is supported now PR-URL: https://github.com/nodejs/node/pull/17395 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Ruben Bridgewater --- doc/api/esm.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api/esm.md b/doc/api/esm.md index b812d7cb76db0b..ef9adbdc73f68d 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`