Open maersk-ps opened 8 months ago
I have the same issue. I use composition for Storybook. If I manually clear the site data it will load but on next reload it will start failing.
Here is a link to my currently deployed storybook on Github pages. It will most likely load on the first try but reloading will cause the preloadStories
error.
Same issue for me, exact same deployment as @Pettor
same issue as well
Do you a have a reproduction repo you can share? If not, can you create one? Go to https://storybook.new or see repro docs. Thank you! 🙏
same here as well
@shilman You can always check https://github.com/Pettor/template-web-app-react out. Just use the Storybook link. It will load the first time but after refreshing you will see errors in the console and the stories won't load.
The main app used for building the published Storybook can be located in apps/web
.
I most likely figured out my issue. In my Vite config for the web project I had a PWA plugin that inject a service worker and other stuff. I thought I was overriding this plugin in the main.ts
file for Storybook but it was actually added in the list. Removing the PWA seem to have solved my issue 🙂
Not sure what the best method for making Storybook ignore the main vite.config.ts
file but I simply added a env variable when building Storybook that will return an empty config file for now and let main.ts
take care of the configuration.
Had the same exact problem. I was serving my content with npx server -s storybook-static
. Removing the -s
flag resolved the issue completely.
This is what the -s
flag does, according to it's API. Maybe there's some rewriting happening in your deployment?
-s, --single Rewrite all not-found requests to `index.html`
Describe the bug
I am currently facing this issue only on the deployed version, locally unable to reproduce this issue .
I am using
"storybook": "^7.4.0"
.Please help
To Reproduce
No response
System
No response
Additional context
No response