Excluding specific story exports from static builds #15134
Unanswered
ccrowley96
asked this question in
Help
Replies: 1 comment 2 replies
-
You might be able to conditionally set CSF's https://storybook.js.org/docs/react/api/csf#non-story-exports |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone : )
Our team is building a React component library with Storybook. Certain components are tied to backend APIs which require callback URLs, because of this, these components error out in the static / docs build of our storybook. We've created mock stories for documentation purposes and only want those stories exported in the build process.
Here's what we're trying to do:
start-storybook
.build-storybook
I'm not sure how to get this working. So far, it seems like the
.storybook/main.js
webpackFinal configType may be of use here.start-storybook
-configType=DEVELOPMENT
build-storybook
-configType=PRODUCTION
If anyone has any tips / configuration for something like this, please let me know!
Beta Was this translation helpful? Give feedback.
All reactions