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

feat: support react-docgen-typescript #223

Merged
merged 1 commit into from
Feb 5, 2025
Merged

feat: support react-docgen-typescript #223

merged 1 commit into from
Feb 5, 2025

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Jan 22, 2025

The previous implementation of #58 is wrong, it ports the Vite version react-docgen while react-docgen is implemented by using react-docgen-loader here.

Since Rspack doesn't support essential custom template now, we implement this in Vite builder flavor with Rsbuild's flexible API. Which ported https://github.com/joshwooding/vite-plugin-react-docgen-typescript, thanks for @joshwooding's awesome work.

The current implementations of the docgen and builders are shown in the matrix below:

react-docgen react-docgen-typescript
webpack builder react-docgen-loader @storybook/react-docgen-typescript-plugin
Vite builder react-docgen plugin @joshwooding/vite-plugin-react-docgen-typescript and react-docgen plugin
Rsbuild builder react-docgen-loader forked @joshwooding/vite-plugin-react-docgen-typescript in this PR

There's one thing I don't understand, in storybookjs/storybook#19399, why react-docgen is also always enabled even when using react-docgen-typescript. I tried to disable react-docgen, react-docgen-typescript works fine alone anyway.

Friendly ping @joshwooding, thank you for your awesome work of the vite-plugin-react-docgen-typescript and integrations of Vite builder. Could you please explain why react-docgen is always enabled here? Thank you very much!

Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for storybook-rsbuild canceled.

Name Link
🔨 Latest commit 5edead3
🔍 Latest deploy log https://app.netlify.com/sites/storybook-rsbuild/deploys/67a2dddd2772350008e2b018

@fi3ework
Copy link
Member Author

fi3ework commented Feb 5, 2025

I will merge this PR for now. Feel free to add any information that might help. Thank you very much.

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

Successfully merging this pull request may close these issues.

1 participant