privatenumber / pkgroll

📦 Zero-config package bundler for Node.js + TypeScript
MIT License
1.21k stars 29 forks source link

Support for subpath patterns #38

Open Pirosauro opened 1 year ago

Pirosauro commented 1 year ago

Currently, subpath patterns defined in package.json raise an exception. Not sure if it should be considered a bug or a feature request.

package.json

...
        "./*.js": {
            "import": "./dist/*.mjs",
            "require": "./dist/*.cjs",
            "default": "./dist/*.mjs"
        }
...

Error: Could not find matching source file for export path "./dist/*.cjs

privatenumber commented 1 year ago

Probably a feature request. I never tried handling this because of the complexity. But should be much easier to tackle with https://github.com/privatenumber/pkg-entry-points

PR welcome!

Pirosauro commented 1 year ago

nice! I'll have a look next weekend and let you know either if I'm going to take the challenge or not

panukettu commented 1 year ago

wanted to test pkgroll but sadly for me its not worth the effort without this