Closed ruscoder closed 1 month ago
I started working on fixing the particular issue with an extra new line, but it is not a solution for the issue in general. https://github.com/beda-software/vite-plugin-dts/tree/patch-356
The transformation that vite-plugin-dts makes, might change d.ts file significantly, so, maps files won't be accurate in some cases.
Describe the bug
I found that d.ts.map does not match d.ts file after some transformations from vite-plugin-dts. It leads to issues with debugging and navigation in IDE.
Original (after tsc): https://stackblitz.com/edit/vitejs-vite-jeijwx?file=tscdist%2Fb.d.ts
Transformed d.ts (after vite-plugin-dts): https://stackblitz.com/edit/vitejs-vite-jeijwx?file=dist%2Fb.d.ts
And d.ts.map are the same https://stackblitz.com/edit/vitejs-vite-jeijwx?file=dist%2Fb.d.ts.map https://stackblitz.com/edit/vitejs-vite-jeijwx?file=tscdist%2Fb.d.ts.map
Reproduction
https://stackblitz.com/edit/vitejs-vite-jeijwx?file=dist%2Fb.d.ts
Steps to reproduce
No response
System Info
Validations