Unverified Commit 58a59a8d authored by cjihrig's avatar cjihrig
Browse files

doc: improve createRequire() example

Update the example to use import and import.meta.url instead
of require() and require.resolve().

PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
parent 64182e95
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment