doc: add examples for implementing ESM#33168
Conversation
|
@nodejs/modules-active-members |
GeoffreyBooth
left a comment
There was a problem hiding this comment.
This PR seems to be adding an example explaining how import and export work in JavaScript in general, not particular to Node. I thought our general rule was that the Node docs only describe things specific to Node; they're not a general JavaScript tutorial like MDN. See #31479.
It's fine to add links to MDN, but we shouldn't be duplicating that resource.
|
I think having a small example is fine, but if we could link to MDN like @GeoffreyBooth states as well it would give people a place to get a more in depth understanding. |
|
@GeoffreyBooth @bmeck There are links to MDN (for @dnalborczyk @aduh95 Fixed. Feedback is appreciated. Thanks! |
|
Landed in 4780493 |
Fixes: nodejs#28060 PR-URL: nodejs#33168 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Fixes: #28060
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes