Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Subpath patterns support #45

Open
Tracked by #44
cometkim opened this issue Aug 14, 2022 · 0 comments
Open
Tracked by #44

RFC: Subpath patterns support #45

cometkim opened this issue Aug 14, 2022 · 0 comments
Labels
enhancement New feature or request idea
Milestone

Comments

@cometkim
Copy link
Owner

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.

@cometkim cometkim added enhancement New feature or request idea labels Aug 14, 2022
@cometkim cometkim added this to the v1 milestone Aug 14, 2022
@cometkim cometkim mentioned this issue Aug 14, 2022
6 tasks
@cometkim cometkim modified the milestones: v1, v1.x Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea
Projects
None yet
Development

No branches or pull requests

1 participant