Conversation
Trott
left a comment
There was a problem hiding this comment.
Change LGTM although I'd like it even more with the little nit I left addressed.
doc/api/esm.md
Outdated
| 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. `import()` can also be used to create entry points |
There was a problem hiding this comment.
Non-blocking nit: I know this was in the original text, but import is a statement and not a function so the () should be removed. Same on line 43.
There was a problem hiding this comment.
should I just say "dynamic import" then? the majority of the community refers to it as import()
There was a problem hiding this comment.
Maybe leave it alone then. (Hey, I said it was non-blocking!) I see that even the TC39 proposal uses import() and refers to it as "function-like". https://github.com/tc39/proposal-dynamic-import
doc/api/esm.md
Outdated
| 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 to create entry points | ||
| into ESM graphs at run time. |
There was a problem hiding this comment.
Only with an additional CLI flag --harmony_dynamic_import.
There was a problem hiding this comment.
like i said in the first comment, this might need to wait until that flag goes away, but i can doc it as being available from there also
There was a problem hiding this comment.
I'd go for documenting it as it is to get this in right now.
PR-URL: nodejs#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>
|
Landed in 11ebaff |
PR-URL: #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>
|
This should be backported in #17823 |
|
This landed too soon on v9.x. See #18202. |
I don't know if this should wait until
import()is out from behind its own flag, but the change will need to happen at some point so here it is.Checklist
Affected core subsystem(s)