Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding publicPath to Storybook React

We have our Storybook React project in a subpath (http://example.com/storybook) but the production version is looking for assets at the top level (http://example.com/font.woff).

I was reading that you could add a publicPath property or add an override on __webpack_public_path__ but I can't see where to do this?

like image 896
Richard Fernandez Avatar asked Oct 28 '25 02:10

Richard Fernandez


1 Answers

I had a similar issue with Storybook. Please check the options for build command line. I solved my problem using this link, specially

build-storybook --static-dir storybook

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

like image 57
Gaspar Teixeira Avatar answered Oct 30 '25 19:10

Gaspar Teixeira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!