-
-
Notifications
You must be signed in to change notification settings - Fork 75
Export "types" for "require" too #1572
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
Comments
More information here: https://publint.dev/rules#types_not_exported Issue on Publint repo: publint/publint#160 |
Hi @romainmenke , thanks for the reply, I didn't know there was a long context to this! ESM/CJS type resolution is a very complex and finicky issue I am well aware of. I can see that tools like unbuild and tshy have been suggested before. The TanStack team now use our own tool, which is effectively just a shared Vite config which solves all of these problems we've encountered. If you're open to it, I'd be happy to submit a draft PR to show what this would look like for this repo? |
No we are not going to change our setup or built system. With support for es module imports from commonjs picking up this is the better way forward. You can silence errors with things like |
Absolutely! Glad to hear :) |
For example, in @csstools/css-calc package.json
It lacks "types" for cjs.
It causes
error TS7016: Could not find a declaration file for module '@csstools/css-calc'
when building with vite.See: https://github.com/asamuzaK/cssColor/actions/runs/13327572771/job/37224110621#step:5:112
The text was updated successfully, but these errors were encountered: