Closed
Description
We are using tsup in storybook to bundle our files and create .d.ts
files. A user, @weswigham, explained to us that we need to actually create separate type definition files for esm and cjs. Is this something that others have encountered? If so, maybe it makes sense for tsup to generate both .d.ts
and .d.mts
files.
It looks like this is a typescript 4.7+ feature, and is explained in https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing, which shows separate declaration files for the esm and cjs exports.
The .d.mts
and .d.cts
extensions themselves are supported from 4.5+ (https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#new-file-extensions)
Metadata
Metadata
Assignees
Labels
No labels