-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Storybook iframe.html Failed to load resource #11694
Comments
We had this issue so I've managed to fix this by running |
Do you have an example? When I build storybook, and host it: We can't hard-code an absolute url, because some people host static-storybook in a sub-directory. |
@ndelangen Thanks for the response, |
So you change: <script src="runtime~app.1491145c4d6866f9125d.bundle.js"></script> into: <script src="/runtime~app.1491145c4d6866f9125d.bundle.js"></script> Why are your assets and html pages not in the same directory when deploying? Why would this 'hack' not be needed for |
incorrect
When I create a build storybook Deploy the files in the storybook-static folder to git-pages. The build result index.html, iframe.html and iframe.html are created. When I open the iframe.html file, the output of the bundle.js file is incorrect and it outputs |
@s-ong-c I'm having difficulty understanding what you mean. Can you tell me if this statement is correct? When I look at So are you removing the |
@ndelangen build result static-storybook directory The src path in Iframe.html is wrong as below. but The src path in index.html is correct as below. So are you removing the / slashes rather then adding them? YES But should I do this every time?? |
That does sound like a bug.. Would you be open to trying the 6.0.0 RC? I think it's fixed in that. If you really need a patch on 5.x, could you assist? |
Try upgrading to 6.0 RC?
|
I tried to upgrade, but the same error |
Not sure what the fix would be, since I don't know anything about Expo, but I took a look and see what is happening, if that hadn't been found. Not sure if the problem was just about a fix or why it is happening, because the cause seems intentional, for some reason that may make sense if you know about expo. The Only affects Instead of a
Following |
I saw you late. You're right. Thank you very much. |
I had a similar issue, for me, the resources were not loaded because I set in the .storybook/preview-head.html a tag, after removing it the resources loaded correctly |
Hi,
When build storybook is executed, output is executed or distributed.
However, it failed to load resoure despite the bundle file in iframe.html.
Of course, you can change the path to absolute path directly in iframe.html, but do you have to do this every time?
Version
"@storybook/addon-docs": "^5.3.19",
"@storybook/cli": "^5.3.19",
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
The path is wrong, as in the code below.
The text was updated successfully, but these errors were encountered: