Vite Plugin React Docgen Typescript screenshot

Vite Plugin React Docgen Typescript

Author Avatar Theme by Joshwooding
Updated: 8 Dec 2025
19 Stars

Categories

Overview

If you’re a developer working with React and TypeScript, you’re likely familiar with the need for effective documentation and type management. The @joshwooding/vite-plugin-react-docgen-typescript offers a solution that helps inject React TypeScript docgen information seamlessly into your Vite projects. This plugin simplifies the process of generating prop types and display names, making your components easier to document and use.

With its array of customizable options, this plugin caters to varying project needs, from specifying TypeScript configuration files to including or excluding certain files from docgen generation. It’s designed to enhance both the developer experience and the usability of your React components.

Features

  • Customizable tsconfigPath: Specify the location of your tsconfig.json to tailor the plugin’s behavior to your project’s setup.
  • Flexible compilerOptions: Adjust compiler configurations for your TypeScript files directly without using a separate tsconfigPath.
  • Display Name Control: Choose whether to automatically set the components’ display names or manage them manually to fit your documentation style.
  • Type Prop Customization: Easily specify the name of the property used for documenting component prop types, enhancing clarity in your documentation.
  • Exclusion Patterns: Use glob patterns to ignore specific files or directories from docgen information generation, ideal for large libraries or assets.
  • Inclusion Patterns: Define glob patterns to ensure specific files are always included in the docgen process, ensuring comprehensive documentation for your essentials.
  • Experimental Watch Modes: Activate experimental features for hot module replacement support, keeping your development workflow smooth (with a performance warning).
  • Project Service Mode: Enable an experimental mode that integrates the TypeScript project service for improved hot module replacement functionalities, though it may impact performance.