Open michaelfaith opened 1 year ago
I have used the outputPath
hook to rename output files to .d.ts
:
plugins: [
ts({
// ...
hook: {
outputPath: (path) => path.replace(/\.d\..ts/, '.d.ts'),
},
}),
Docs: https://github.com/wessberg/rollup-plugin-ts?tab=readme-ov-file#the-outputpath-hook
Question
Is it possible to disable the automatic extension naming? In our package, we're generating both
cjs
andmjs
, but the type declarations are the same, and it would be redundant to include both. We'd like to just have.d.ts
files in the root, and the cjs/mjs files nested in acjs
andesm
folder. I can't seem to find a way to do this without having two sets of type declarations. This is my only real gripe. Otherwise, I've enjoyed the shift to this library.RE: