G
G
Governor2021-03-21 14:40:30
Node.js
Governor, 2021-03-21 14:40:30

Where is the list of enabled modules stored?

Including the module like this: the node loads the file data and its fields become available, then including this file in another file, the node does not include the new file again, but gives access to the one already included. So, I need to access modules without specifying the path to their files. And it is desirable to get a list of included modules. Maybe they are stored somewhere in process ? Is it possible to implement this in node.js? const file = requre("pathToFile");exports


Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2021-03-21
@Lynn

https://nodejs.org/dist/latest-v14.x/docs/api/modu...
But given your (non-) knowledge, I would not advise you to go there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question