unjs / mkdist

Lightweight file-to-file transpiler.
MIT License
350 stars 25 forks source link

provide option for disabling `.d.mts` extension #28

Open danielroe opened 2 years ago

danielroe commented 2 years ago

These are experimental at the moment and without widespread support.

https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions

follow up on https://github.com/unjs/mkdist/pull/26

pi0 commented 1 year ago

We have declaration: boolean option and #162 that generates .d.mts / .d.cts for .mts and .cts sources by default.

Does it makes sense that we introduce an option for default declaration ext (declarationExt) defaulting to .d.ts and being configurable?