codesandbox/sandpack

Not working in localhost

Opened this issue · 0 comments

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

Safari doesn't allow loading https content when the host location is http. Due to the fact, when running a site locally at http://localhost:port, Safari refuses to display the preview.

CleanShot 2024-02-01 at 13 21 11@2x

I tried setting up a local proxy and specifying bundleURL, however, looks like Sandpack added a random ID to the hostname, so if the bundleURL is set to http://localhost:port, the final endpoint becomes http://randomid-localhost:port.

Your Environment

Software Name/Version
Sandpack-client version
Sandpack-react version 2.11.3
Browser Safari 17
Operating System macOS