Closed aminpaks closed 11 months ago
What concrete problem does this solve? As far as I know, TS will already pick up the current declaration files.
@marijnh if you set bundler
or nodenext
as your module resolution in TS config, it won't pick up the types
property of the package.json, it will look for counterpart of exports
.
Read more here.
Are you entirely sure that the current setup doesn't work? Because I'm using this system (make sure the declaration's filename matches the exported dist file) across all my packages, and it actually solves this problem, as far as I'm aware.
Are you entirely sure that the current setup doesn't work? Because I'm using this system (make sure the declaration's filename matches the exported dist file) across all my packages, and it actually solves this problem, as far as I'm aware.
I'm testing, and it seems it's working now. I'm not entire sure how it was failing but it was initially failing for me.
Thans for looking into it. 🙏
Apologies, I double checked, and it seems the issue was on v1.0.0. The latest has the correct path to types.
Adds the proper value in
package.exports
for TypeScript to pick the type declarations.