espub
espub copied to clipboard
RFC: Subpath patterns support
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.