Core: iframe.html no longer built with --preview-url
See original GitHub issueDescribe the bug Since upgrading to 6.2.7 from 6.1.21, we’re no longer seeing an iframe.html generated, and it seems the --preview-url flag has been removed from the CLI? I didn’t see any release notes about this, and it’s causing our CDN deploy to break. Our build script looks like this
STORYBOOK_BASE_URL=$STORYBOOK_BASE_URL yarn build:storybook:docs --preview-url="${STORYBOOK_BASE_URL}iframe.html"
Screenshots
Before:
After:

Code snippets If applicable, add code samples to help explain your problem.
System
Please paste the results of npx sb@next info here.
Additional context Add any other context about the problem here.
┆Issue is synchronized with this Asana task by Unito
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Html code as IFRAME source rather than a URL - Stack Overflow
You can do this with a data URL. This includes the entire document in a single string of HTML. For example, the following...
Read more >The ultimate guide to iframes - LogRocket Blog
Finally, we'll talk about how you can secure your iframe to avoid potential vulnerabilities. What is an iframe, and when do you use...
Read more >open website in iframe
Open Website In Iframe0 (AJAX) like experience to their users where parts of the Web Page …. Loading two frames with one link....
Read more >telemeta Changelog - pyup.io
EXPERIMENTAL: WebM and MP4 video handling for items, NO transcode but decode, ... Embedable resizable audio player with an iframe HTML object
Read more >It's time to lazy-load offscreen iframes! - web.dev
Browser-level built-in lazy-loading for iframes is here ... leaving more bandwidth to load resources which contribute to a page's LCP.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@shilman I can confirm that your fix fixes the problem which I believe was the problem the OP had. However, it seems like a lot of people are using
--preview-urlto allow storybook to be served from a sub-directory as suggested here: https://github.com/storybookjs/storybook/issues/1291#issuecomment-795251283 Perhaps if there was some documentation on the correct way to serve storybook from a subdirectory and some more information on what--preview-urlshould be used for, there would not be this confusion and the need for cli options such as--force-build-previewOk thanks for explaining. I’ll see if i can restore the old behavior for now (or maybe fix the other bug?!), and there’s a good chance we’ll be revisiting the preview url feature in the coming months