Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@joshwooding/vite-plugin-react-docgen-typescript

joshwooding8.8mMIT0.6.0TypeScript support: included

A vite plugin to inject react typescript docgen information

readme

@joshwooding/vite-plugin-react-docgen-typescript

npm Code style: Prettier

A vite plugin to inject react typescript docgen information

 

Usage

import reactDocgenTypescript from "@joshwooding/vite-plugin-react-docgen-typescript";

export default {
  plugins: [reactDocgenTypescript()],
};

Options

This plugins support all parser options from react-docgen-typescript and all of the following options:

Option Type Description Default
tsconfigPath string Specify the location of the tsconfig.json to use. null
compilerOptions object Specify compiler options. Cannot be used with tsconfigPath null
setDisplayName boolean Set the components' display name. If you want to set display names yourself or are using another plugin to do this, you should disable this option. true
typePropName string Specify the name of the property for docgen info prop type. type
exclude glob[] Glob patterns to ignore and not generate docgen information for. (Great for ignoring large icon libraries) []
include glob[] Glob patterns to generate docgen information for ['**/**.tsx']
EXPERIMENTAL_useWatchProgram boolean Enables an experimental watch mode to enable HMR support. warning: This may affect performance false
EXPERIMENTAL_useProjectService boolean Enables an experimental mode that uses the TS project service to enable HMR support. warning: This may affect performance false

changelog

Changelog

0.3.0

Minor Changes

  • 571603c: Add support for vite 5

0.2.3

Patch Changes

  • 7c2c982: Fix performance regression

0.2.2

Patch Changes

  • 2edf4d0: Fix HMR support

0.2.1

Patch Changes

  • 9463cc0: fix the incorrect ts import() optimize performance by creating tsProgram just once

0.2.0

Minor Changes

  • d995bc7: Make typescript an optional peer dependency

Patch Changes

  • 8473afb: Expand vite version range: allow v4

0.1.0

Minor Changes

  • 55d8589: Update unbuild and magic-string

[0.0.6]

Breaking Changes

  • Removed docgenCollectionName
  • Only support vite 3+

[0.0.5] - 2022-07-23

Chore

  • Move to unbuild

Fixed

  • Fix filtering for workspaces

[0.0.4] - 2022-04-02

Added

  • Generate sourcemaps

[0.0.3] - 2022-03-19

Fixed

  • Return "null" map when no component docs are generated.

0.0.2 - 2022-01-31

Added

  • Add a default propFilter.
  • Add typescript as a peer dependency.

0.0.1 - 2022-01-31

Initial release.