Preserve comments? #125
-
I'm packaging my library up but I'm using JS/TSdoc to handle documentation. The issue is that pkgroll strips these comments away. It's enough of an issue that I might have to look at TSUp and wondering if you have any solutions for it. |
Beta Was this translation helpful? Give feedback.
Answered by
privatenumber
Jul 5, 2025
Replies: 1 comment 11 replies
-
Are you running with minification enabled? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nope, you just set the
.d.ts
files in theexports
like from the example in the README.In this example, it uses
.d.cts
and.d.mts
to explicitly indicate whether its a CommonJS module or ES module:Learn more on this here:
https://hirok.io/posts/package-json-exports#targeting-node-js-esm-cjs-type-definitions
esbuild just doesn't support preserving comments in the parsing stage and only made exceptions for special kind of comments like…