Like we can modify output extension of JavaScript files is there also a way to do the same for type definition files?
I tried returning this because dts
was showing up in the autocomplete return options but it doesn't work.
format: ['cjs', 'esm'],
outExtension({ format }) {
switch (format) {
case 'cjs': {
return { js: '.cjs', dts: '.d.cts' };
}
case 'esm': {
return { js: '.mjs', dts: '.d.mts' };
}
default: {
return { js: '.js', dts: '.d.ts' };
}
}
}
Output type definition files generated after building have extensions .d.ts
and .d.cts
which is the default since my package is of type module. Is there a way to do this?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too