You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug The docs state that the typescript.reactDocgen main.js config option can have 1 of three values: react-docgen-typescript, react-docgen or none. However, the docs here include "also valid 'react-docgen-typescript' | false" on line 126, saying that false should be used not "none", the core types seem to back this up. Furthermore, "none" or false seem to have the same effect which is to behave exactly like "react-docgen" was passed.
To Reproduce
Steps to reproduce the behavior:
Setup a fresh react + typescript project.
Add the docgen rule to your main.js typescript: {reactDocgen: "none"}
Log the webpack config in your main.js webpackFinal: (config) => { console.log(JSON.stringify(config, null, 2)); return config; }
Launch storybook.
You should see that the babel-plugin-react-docgen plugin was included in the outputted config.
Expected behavior
I would expect the typescript.reactDocgen option to perform as follows:
"react-docgen": to include babel-plugin-react-docgen
"react-docgen-typescript": to include the ReactDocgenTypescriptPlugin
"none" or false: to include neither
Perhaps 1 of "none" or false should be decided on.
Additional context
I am wanting to disable react-docgen, as I am pre-compiling from TSX to JSX before storybook gets involved and am including docgen info there myself.
The text was updated successfully, but these errors were encountered:
Describe the bug
The docs state that the
typescript.reactDocgen
main.js config option can have 1 of three values:react-docgen-typescript
,react-docgen
ornone
. However, the docs here include "also valid 'react-docgen-typescript' | false" on line 126, saying thatfalse
should be used not"none"
, the core types seem to back this up. Furthermore,"none"
orfalse
seem to have the same effect which is to behave exactly like"react-docgen"
was passed.To Reproduce
Steps to reproduce the behavior:
typescript: {reactDocgen: "none"}
webpackFinal: (config) => { console.log(JSON.stringify(config, null, 2)); return config; }
babel-plugin-react-docgen
plugin was included in the outputted config.Expected behavior
I would expect the
typescript.reactDocgen
option to perform as follows:"react-docgen"
: to include babel-plugin-react-docgen"react-docgen-typescript":
to include the ReactDocgenTypescriptPlugin"none"
orfalse
: to include neitherPerhaps 1 of
"none"
orfalse
should be decided on.Code snippets
https://github.com/storybookjs/storybook/blob/master/app/react/src/server/framework-preset-react-docgen.ts#L13 seems to be the crux of the problem. Looks like it needs a 3rd case for
"none"
orfalse
.System:
Additional context
I am wanting to disable
react-docgen
, as I am pre-compiling from TSX to JSX before storybook gets involved and am including docgen info there myself.The text was updated successfully, but these errors were encountered: