Skip to content

"imports" field support #12928

Closed
Closed
@guybedford

Description

@guybedford

Feature request

In addition to the "exports" field, Node.js also defines the "imports" field to permit private internal resolutions to simplify backtracking and local conditional resolution cases. As far as I can tell this field isn't yet supported in Webpack.

What is the expected behavior?

When writing a package.json with an "imports" field, the #private specifier resolutions should resolve through these rules analogously to the exports field.

What is motivation or use case for adding/changing the behavior?

Node.js resolver support parity.

How should this be implemented in your opinion?

It's a similar extension to the exports field and exports package "own name" resolution.

Are you willing to work on this yourself?

Possibly!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions