-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Question] How is JSDoc handled ? #294
Comments
The comment is only being preserved because it contains the text |
@evanw Thanks for the explanation. Again, I want to say, |
@evanw is it possible to keep all JSDoc comments? My use case is JS utils and small libraries I write and host on NPM. No minifying/sourcemaps, only bundling to The beauty about JSDoc comments is that a lot of editors (like VSCode) show popup information when a function is imported that has JSDoc comments. The information can vary from just developer notes to the type of arguments and return types. I'm evaluating replacing rollup from esbuild. If esbuild can only strip JSDoc comments, is there some way I can retain the popup information that editors support? |
No, there is no way to do this with esbuild. You're better off using Rollup in this case. |
First of all, this is very nice work ! 👍
A bit of context, I used to transpile some TypeScript files (with tons of JSDoc comments) with
tsc
and then generate developer documentation with some tool named Docma.Now I'm trying
esbuild
(JavaScript API) and I noticed it keeps classes related JSDoc comments in the output but ignores the ones related to constructors or methods or enums, here is an example where we have aMovie
class with some string property actually related to an enumISO_639_1
.Input
Output
This is the output (tested with
minify
parameter with bothfalse
andtrue
values) :Right now, I'm not sure if this is because I'm missing some settings, or if the issue is somewhere else.
The text was updated successfully, but these errors were encountered: