area17 / blast

Storybook for Laravel Blade 🚀
https://dev.to/area17/getting-started-with-blast-storybook-for-laravel-blade-c5c
Apache License 2.0
262 stars 37 forks source link

Feature request: allow dynamic urls #114

Open fruitl00p opened 4 months ago

fruitl00p commented 4 months ago

Currently we're bulding a static version of the storybook (blast:publish) and including that in a docker image to be deployed to various urls... Thus the STORYBOOK_SERVER_URL still includes the storybook_preview (which is weird as i'd like to have a static build of the entire storybook)

So what am i doing wrong? Is this something inside storybook or in the combination of blast and storybook ?

ifox commented 4 months ago

Blast is using Storybook Server, so that's completely expected. If you are not using story controls, I understand why you'd think that it could just generate everything statically for publishing, but the moment you have something dynamic in a story, Blast is making a request to your Laravel application to get that Blade view rendered with the new parameters. So technically if you wanted all that to work statically, you would need to generate the static response for every single permutation of your stories arguments. Hope that makes sense.

fruitl00p commented 4 months ago

Not really. I can understand that it still requires some backend processing, but using relative urls would be enough. As we publish the 'static' files during CI/CD into a docker image the actual deployment of the resulting containers determine the full-url... Is there any way to allow relative URL's to be enough? (its not like we're deploying to HTML only server environment)