Skip to content

Require from internal folder #14570

@streamich

Description

@streamich

This might be a somewhat controversial proposal: allow users to require from internal folder, like require('internal/fs.js').

One can already use the hidden modules in the /lib folder, like:

require('_http_agent');
require('_http_client');
// etc.

However, I am not aware of a way to access the modules in /lib/internal folder. Does anyone know a way to require those? Are there any issues with that?

I know that in this form it would conflict with the internal package, so the exact syntax has still to be figured out.

This could be provided as "use at your own risk".

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions