Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropTypes are missing in info panel in static build #1661

Closed
iernie opened this issue Aug 15, 2017 · 6 comments
Closed

PropTypes are missing in info panel in static build #1661

iernie opened this issue Aug 15, 2017 · 6 comments
Assignees

Comments

@iernie
Copy link

iernie commented Aug 15, 2017

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
live

And here is how it looks once it's built static
static

Versions are

  • @storybook/react v3.2.4
  • @storybook/addon-info v3.2.4
@danielduan
Copy link
Member

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-docgen doesn't run.

@DanielJRutledge
Copy link

DanielJRutledge commented Aug 23, 2017

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

@danielduan danielduan self-assigned this Aug 23, 2017
@danielduan
Copy link
Member

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.

@DanielJRutledge
Copy link

A custom .babelrc would only be employed on non-static builds?

@danielduan
Copy link
Member

@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.

@danielduan
Copy link
Member

Think this issue has been fixed when we refactored the server code to the core package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants