doc: improve createRequire() example · nodejs/node@55fe340 · GitHub
Skip to content

Commit 55fe340

Browse files
cjihrigBridgeAR
authored andcommitted
doc: improve createRequire() example
Update the example to use import and import.meta.url instead of require() and require.resolve(). PR-URL: #27762 Fixes: #27758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 2bc177a commit 55fe340

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.eslintrc.js

Lines changed: 1 addition & 0 deletions

doc/api/modules.md

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)