Swatinem/rollup-plugin-dts

declarationMap support

kacpak opened this issue · 3 comments

Hi, I haven't found information about it and I cannot test it out to verify myself this week, but I'm wondering if this plugin supports TypeScript's declaration map support?
If no - would you consider adding it in?

So rollup on its own has excellent sourceMap support. But we do some pre- and post-processing of whatever rollup does, apart from the synthetic AST that I generate. And I really don’t want to manually maintain a sourceMap for all that.

I suspect doing that is a huge amount of work, and I certainly don’t want to do that on my own :-D

Yes, magic-string would help here, and I converted the preprocessor code to it some time ago. There is also postprocessor code that fixes up some namespace declarations which would also need to be adapted to magic-string. I never got around to that.

PRs welcome though.