How to get preview by itself in sandpack? #1060
Unanswered
lancejpollard
asked this question in
Q&A
Replies: 1 comment
-
It's a bit out of my expertise, I've never worked with puppeteer. But I remember when I implemented Playwright for e2e tests in Sandpack, and I faced a lot of challenges to make the bundler work: a) you need to make sure it can connect to an external domain b) find out when the iframe is loaded, evaluated and bundled everything. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking to render the preview to PDF (from the server-side using puppeteer). So it needs a custom URL to load the preview, how do I do that?
Do I load the
<SandpackPreview>
by itself, with no layout, sort of like this (loaded athttps://preview.example.com/my-code
instead of just/my-code
)?And/or do I need to hook up a subdomain to load the preview iframe securely? How should I accomplish this?
I am in Next.js if that matters.
Beta Was this translation helpful? Give feedback.
All reactions