vilicvane
vilicvane

Reputation: 12413

Is there any way to access an internal Node.js module?

By "internal" I mean something like internal/process/esm_loader.

I've tried process, require('module') but cannot find a way out.

Upvotes: 0

Views: 1066

Answers (1)

bmacnaughton
bmacnaughton

Reputation: 5308

Yes, you can by starting node with the --expose-internals option. There is no documented API so using internal modules may not continue to work from one nodejs release to another.

Upvotes: 1

Related Questions