This Webpack plugin is designed to generate documentation generation (docgen) information specifically for TypeScript React components. It integrates with your Webpack configuration to parse component props and JSDoc comments, primarily intended for use with tools like Storybook's `addon-info` (though `addon-info` itself is now deprecated). The current stable version is 1.1.0. However, the project explicitly states it's experimental, a 'hack job,' and 'not suitable for production.' It has not seen updates since 2019, indicating an abandoned release cadence. Its key differentiator was providing TypeScript support for React docgen at a time when this was less common, but due to its unmaintained status and limitations, it's not recommended for new projects.
npm install react-docgen-typescript-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
This Webpack configuration snippet demonstrates how to integrate `react-docgen-typescript-webpack-plugin` into a Storybook setup, adding a TypeScript rule with `ts-loader` and instantiating the plugin to generate docgen information.
For new projects, consider using `@storybook/addon-docs` directly, which has built-in TypeScript support and does not require this plugin. For existing projects, evaluate the risk of using unmaintained software.
Always use named exports for components you wish to generate docgen for. E.g., `export const MyComponent = ...;` instead of `export default MyComponent;`.
If encountering issues, try setting the `module` compiler option in your `tsconfig.json` to a different value like `commonjs` or `es2015` and check if the problem resolves. Consult `react-docgen-typescript` limitations for further context.
Ensure your `storiesOf` call uses the component's name as the story title (e.g., `storiesOf('...', module).add('ColorButton', ...)`) if you are still relying on `addon-info`.Ensure your component is a named export (e.g., `export const MyComponent`) and that your Storybook story's title exactly matches this named export.
Modify your `tsconfig.json` to use a different `module` target like `commonjs` or `es2015` if possible, and re-evaluate your build.
No dependency data recorded yet.