Storybook: [Feature] Multiple static dirs

Created on 3 Jun 2016  路  3Comments  路  Source: storybookjs/storybook

In my project I have multiple packages adding static files to it from different places.
Besides my own files at /public I have, for example, semantic-ui adding fonts and icons from a different location. With Storybook I can only serve one of them by pointing to a single location.

Can we change the --static-dir [dir-name] option to accept multiple folders instead of just one ?

Most helpful comment

Released v1.29.0

Now it'll accept multiple static directories separated by commas.
Thanks for submitting the issue.

All 3 comments

Released v1.29.0

Now it'll accept multiple static directories separated by commas.
Thanks for submitting the issue.

Thank you! You guys are always fast and very supportive 馃弰

This is now documented in the docs:

-s, --static-dir <dir-names> Directory where to load static files from, comma-separated list

Source: https://storybook.js.org/configurations/cli-options/

And here is a small example of how this could look like in your scripts object, in case anybody finds it helpful:

"storybook": "start-storybook -s ./static-foo,./static-bar -p 9001"

Was this page helpful?
0 / 5 - 0 ratings