Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support declarationMap #81

Open
1 of 2 tasks
mrjackdavis opened this issue Aug 22, 2024 · 2 comments
Open
1 of 2 tasks

Support declarationMap #81

mrjackdavis opened this issue Aug 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mrjackdavis
Copy link

Feature request

pkgroll bundles don't include sourcemaps for declaration files

See https://www.typescriptlang.org/tsconfig/#declarationMap

Motivations

I want to implement pkgroll across all packages in our monorepo, but we need source "click-through" capability which depends on declarationMap

Alternatives

No response

Additional context

No response

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work financially will speed up resolution

  • I'm willing to offer financial support
@mrjackdavis mrjackdavis added the enhancement New feature or request label Aug 22, 2024
@privatenumber
Copy link
Owner

Interesting, I didn't even know this was a thing.

We use https://github.com/Swatinem/rollup-plugin-dts to bundle declaration files.

If anyone wants to help, we'll have to investigate whether this supports source maps first or if we should explore alternatives.

@mrjackdavis
Copy link
Author

Yeah it's not often mentioned but crucial to a good monorepo experience

After posting this issue I did some digging. Looks like that rollup plugin is in maintenance mode and doesn't support this feature.

It therefore is likely cumbersome to implement this feature for pkgroll. I spent some time today making our own, very simple, pkgroll equivalent using esbuild and calling tsc with declaration only. It will tide us over for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants