Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed May 10, 2022
1 parent 23e12b1 commit 5a62b13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/builders/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ If you need to override it, you can use the `viteFinal` function and adjust it.

### ArgTypes are not generated automatically

Storybook’s [automatic argType inference](https://storybook.js.org/docs/react/api/argtypes#automatic-argtype-inference) is currently only available for React and Vue3 projects. In react projects, if typescript is found in the project's package.json, we assume the components are written in typescript, and use `react-docgen-typescript`. If this causes problems, you can use `react-docgen` by configuring the `typescript` option in your `.storybook/main.js`:
Currently, [automatic argType inference](../api/argtypes.md#automatic-argtype-inference) is only available for React and Vue3. With React, the Vite builder defaults to `react-docgen-typescript` if TypeScript is listed as a dependency. If you run into any issues, you can revert to `react-docgen` by updating your Storybook configuration file as follows:

<!-- prettier-ignore-start -->

<CodeSnippets
paths={[
'common/storybook-vite-builder-react-docgen.ts.mdx',
'common/storybook-vite-builder-react-docgen.js.mdx',
]}
/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```js
// .storybook/main.js|ts
// .storybook/main.js

module.exports = {
stories: ['../stories/**/*.stories.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
Expand Down

0 comments on commit 5a62b13

Please sign in to comment.