Closed mrazauskas closed 1 year ago
Declaration SourceMaps are generally not supported. Feature development has also halted on this project, see #277
Thanks. This is your project. Just wanted to draw attention.
@mrazauskas could you share the repo again? I am considering to try making a fork with this feature
I don't have it any more, but it was rather simple project with two ts
. Building it with tsc
was emitting the mapping for .d.ts
. But building it with Rollup with --sourcemap
flag was emitting empty/broken mapping.
Checklist
node-resolve
are known to cause issues..d.ts
files generated by TypeScript. The plugin can consume.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
. The plugin ignores these by default, unlessrespectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
Repro
To make life easier, I have created reproduction repo: https://github.com/mrazauskas/x-rollup-declaration-map
Please clone it and follow these steps to reproduce the issue:
yarn
to install dependencies.yarn build --declarationMap
. It will usetsc
directly, the resulting declaration file and its source map can be found in the./build
directory.yarn bundle --sourcemap
. It will use Rollup together with therollup-plugin-dts
, the resulting declaration file and its source map can be found in the./bundle
directory.sourceMappingURL
is included in theindex.d.ts
file, but unfortunately theindex.d.ts.map
is broken.I would expect to have working
index.d.ts.map
in the./bundle
directory. Why not? Rollup has great support for source maps.