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:
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" or false: to include neitherPerhaps 1 of "none" or false 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" or false.
System:
System:
OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 14.4.0 - ~/.nvm/versions/node/v14.4.0/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v14.4.0/bin/npm
Browsers:
Chrome: 85.0.4183.102
Firefox: 74.0
Safari: 13.1.2
npmPackages:
@storybook/addon-essentials: ^6.0.21 => 6.0.21
@storybook/addon-links: ^6.0.21 => 6.0.21
@storybook/node-logger: ^6.0.21 => 6.0.21
@storybook/react: ^6.0.21 => 6.0.21
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.
Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.0-alpha.10 containing PR #12492 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.22 containing PR #12492 that references this issue. Upgrade today to try it out!