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 ?
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"
Most helpful comment
Released
v1.29.0
Now it'll accept multiple static directories separated by commas.
Thanks for submitting the issue.