Skip to content

RFC: Subpath patterns support #45

@cometkim

Description

@cometkim

https://nodejs.org/api/packages.html#subpath-patterns

Node.js exports/imports map has a multi-entry syntax similar to glob.

For subpath pattern imports entries, it can simply add support via a glob matcher like picomatch.

On the other hand, subpath pattern exports are not supported by bundlers, including nanobundle, as they imply the existence of "unbundled modules".

Given that ES modules are supported in both Node.js and browsers today, I'm assuming that if treating subpath pattern exports as an external module won't cause any problems. If so, it can be solved by extending the existing embedPlugin behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions