-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix: correct default CJS exports #475
base: main
Are you sure you want to change the base?
Conversation
Sorry for late review dear @userquin. Do you think you can add some unit tests for |
To test the cjs types we can:
I'm going to create a new repo to test the same fixtures using tsup (will fail for mixed declarations) and pkgroll (using import + require package exports here to allow re-use them in pkgroll). |
When all remaining exports (from the default export) only contains types ( When re-exporting types from another import, there is no an easy way to know if the export is a type, and so when re-exporting exports, the export contining the default will not be changed. Check |
Nice work @userquin. I'm wondering if you would be interested in maintaining it as an external/shared library now. (that converts |
Good idea, maybe we can add it here to the unjs ecosystem... I need to find some free time, too busy at work. |
We should add
exports
toESMExport
interface inmlly
, missing in dts, that's why I added the regex to extract the exports (upps, it is onNamedExport
type):resolves #474