Fix build to ensure type declaration files are correct by:
Removing clean: true from tsup config because it seemed to cause a race condition when running multiple build steps in the same project. This resulted in missing type declaration files some of the time, like in this version (open the dist folder and note no .d.ts files).
Upgrading tsup to ensure that both cjs (.d.ts) and esm (.d.mts) type declarations are created.
Fixing the exports to reference the correct declaration file for cjs and esm as described here.
How to test
See all still works
Compare results on Are the types wrong? (but ignore the node10 resolution errors for now)
Issue: #
What Changed
Fix build to ensure type declaration files are correct by:
clean: true
from tsup config because it seemed to cause a race condition when running multiple build steps in the same project. This resulted in missing type declaration files some of the time, like in this version (open the dist folder and note no.d.ts
files)..d.ts
) and esm (.d.mts
) type declarations are created.How to test
Are the types wrong?
(but ignore the node10 resolution errors for now)