Couldn't find this issue anywhere so I am reporting it here.
It seems that when using the info-addon, the proptypes to a components works when you run storybook locally, but all proptypes are defaulted to type node in a static build of storybook.
The required field is also reset to no in a static build. Default seems to work though.
Here is a picture of it running locally
And here is how it looks once it's built static
Versions are
@storybook/react v3.2.4@storybook/addon-info v3.2.4I think I know what's happening here. On prod, PropTypes get stripped out because it's not necessary in the traditional prod environment sense. Also, the babel-plugin-react-docgen doesn't run.
Am also facing this issue with static builds of storybook. Any suggested workarounds until a fix is put in?
Versions:
@storybook/react, @storybook/addon-info v.3.2.0
There's really no workaround unfortunately. I don't think you can use a custom .babelrc for static builds.
I'll fix it when I get a chance.
A custom .babelrc would only be employed on non-static builds?
@DanielJRutledge unfortunately, yes. I think I'm gonna add it into the prod babel config for now and refactor the function that takes the custom babelrc later.
Think this issue has been fixed when we refactored the server code to the core package.
Most helpful comment
I think I know what's happening here. On prod, PropTypes get stripped out because it's not necessary in the traditional prod environment sense. Also, the
babel-plugin-react-docgendoesn't run.