hipstersmoothie / react-docgen-typescript-plugin

A webpack plugin to inject react typescript docgen information
MIT License
68 stars 28 forks source link

fix: use correct component identifier throughout docblock #92

Closed soren121 closed 5 months ago

soren121 commented 5 months ago

Fixes #91.

PR #58 specifically fixed the identifier problem for __docgenInfo, but it did not fix it for setting displayName or within the global collection object. This PR applies the same identifier change to fix these other two spots.

I also made a change to setDisplayName, that skips adding the displayName if we know that the identifier doesn't match the display name. In this case, it follows that the component must have already set displayName, and it didn't make sense to me that we should set the same property twice. This change isn't strictly necessary, so if you'd rather drop it, I don't mind.

hipstersmoothie commented 5 months ago

:rocket: PR was released in v1.0.8 :rocket: