You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaration maps are enabled by default, like we do for sourcemaps.
Suggested Solution
Adding declarationMap: true to the code excerpted above. If I'm understanding the code correctly in createRollupConfig, the user could opt out of declaration maps by setting declarationMap: false in tsconfig.json, which would override the defaults set in the code snippet above.
Who does this impact? Who is this for?
Library authors who want to make things easier for their library's users, especially devs using their library with VSCode or another IDE that leverages declaration maps.
Describe alternatives you've considered
Instead of code, this could be documentation to recommend to library authors that they add declarationMap: true to their tsconfig.json, but given that declaration maps are a best practice that we want every TS library to use, it seems aligned to the goals of tsdx to make declaration maps "just work" by default.
Additional context
The text was updated successfully, but these errors were encountered:
Yea after writing #488, where I added declarationMap: true to every fixture, I thought that it probably made sense to have as a default too, especially since source maps are already on by default. #479 was also my first hearing of declaration maps 😅
This does rely heavily on #488 going out to fix them, and that currently requires some breaking changes unless we come up with a good workaround 😕
Current Behavior
tsdx enables sourcemaps by default, but not declaration maps.
tsdx/src/createRollupConfig.ts
Lines 155 to 159 in 424fc25
Desired Behavior
Declaration maps are enabled by default, like we do for sourcemaps.
Suggested Solution
Adding
declarationMap: true
to the code excerpted above. If I'm understanding the code correctly in createRollupConfig, the user could opt out of declaration maps by settingdeclarationMap: false
in tsconfig.json, which would override the defaults set in the code snippet above.Who does this impact? Who is this for?
Library authors who want to make things easier for their library's users, especially devs using their library with VSCode or another IDE that leverages declaration maps.
Describe alternatives you've considered
Instead of code, this could be documentation to recommend to library authors that they add
declarationMap: true
to their tsconfig.json, but given that declaration maps are a best practice that we want every TS library to use, it seems aligned to the goals of tsdx to make declaration maps "just work" by default.Additional context
The text was updated successfully, but these errors were encountered: