|
To add a built-in module to the code, what code must be modified? |
Answered by
aduh95
Jan 22, 2022
Replies: 0 comments 4 replies
|
Suppose this guide will be helpful https://www.digitalocean.com/community/tutorials/how-to-create-a-node-js-modulev |
2 replies
|
Clone nodejs/node, add a If you're asking how that module could land on Node.js land, you would need to open a PR on this repo, adding docs, tests, and explanation why you think this module should be part of core. See https://github.com/nodejs/node/blob/HEAD/doc/guides/modules-in-core.md for more info. |
0 replies
Answer selected by
avivkeller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clone nodejs/node, add a
.jsfile inlib/folder, and runmake -j12(depends on your OS/platform, see https://github.com/nodejs/node/blob/HEAD/BUILDING.md for further instructions): voilà. You would now have a node executable atout/Release/nodewith the new built-in module you added.If you're asking how that module could land on Node.js land, you would need to open a PR on this repo, adding docs, tests, and explanation why you think this module should be part of core. See https://github.com/nodejs/node/blob/HEAD/doc/guides/modules-in-core.md for more info.