Skip to content
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

iframe.html is not aligned in webpack.config.js' publicPath #3699

Closed
chardskarth opened this issue Jun 2, 2018 · 11 comments
Closed

iframe.html is not aligned in webpack.config.js' publicPath #3699

chardskarth opened this issue Jun 2, 2018 · 11 comments

Comments

@chardskarth
Copy link

I can confirm, believing to experience the same issue

"manager.bundle.js" and "preview.bundle.js" is requested relative to my publicPath but not for "iframe.html".

Details

I'm trying to host storybook's output on a path (http://something.com/storybook) and "iframe.html" is being requested at http://something.com/ where /storybook is my publicPath in my webpack.config.js

Steps to reproduce

Build the project and see manager.bundle.js. Search for "iframe.html" and see that publicPath is not included.

Upon quick investigation, I think this seems to be the problem. But I wonder If that line can check the webpack's publicPath to append to.

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 3.4.2

Affected platforms

N/A

Screenshots / Screencast / Code Snippets (Optional)

N/A

@danielduan
Copy link
Member

I wonder if simply changing that url to ./iframe.html?... would fix the problem.

@stale
Copy link

stale bot commented Jun 25, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jun 25, 2018
@igor-dv
Copy link
Member

igor-dv commented Jun 27, 2018

Is it still a problem after the discussion in #3172

@stale stale bot removed the inactive label Jun 27, 2018
@chardskarth
Copy link
Author

chardskarth commented Jun 28, 2018

As @danielduan mentioned, I think it would be better if the request to iframe.html would align to webpack's publicPath via changing it to ./iframe.html.

So even though I was able to find a temporary workaround, yes, its still a problem for me.

@stale
Copy link

stale bot commented Jul 19, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jul 19, 2018
@stale
Copy link

stale bot commented Aug 18, 2018

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Aug 18, 2018
@ebrentnelson
Copy link

+1 I am using storybook in a bit of a weird way where we upload all files to a CDN and serve from a server that wants to point to CDN for all static files. So we make great use of publicPath. However, for iframe.html we've had to be a bit creative (essentially create a redirect rule on the server). It would be lovely if we could avoid that.

@signal-intrusion
Copy link

Can confirm this show-stopping bug.

@sarahbethfederman
Copy link

This is an issue for us as well. Having to set the --preview-url flag in addition to the publicPath to get the same result was confusing

@monkeychops
Copy link

monkeychops commented Feb 9, 2021

+1 I am using storybook in a bit of a weird way where we upload all files to a CDN and serve from a server that wants to point to CDN for all static files. So we make great use of publicPath. However, for iframe.html we've had to be a bit creative (essentially create a redirect rule on the server). It would be lovely if we could avoid that.

Also using story book in this way, served from a docker container on a large corporate cluster and built using storybook-build. It needs a custom uri which i set using publicPath but there is no way of changing the iframe path. Please help

===EDIT===
--preview-url with the correct path solved my issue as noted above.

@valentinpalkovic
Copy link
Contributor

This issue seems to be solved. Please let me know if the issue still pops up. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants