deck-studio
deck-studio copied to clipboard
Stop using codesandbox servers
The iframe is hitting codesandbox here. No idea how that works but we probably should self-host it.
I think we can extract and host these files from the codesandbox-client build folder:
- codesandbox-client/packages/app/www/frame.html
- codesandbox-client/packages/app/www/js/sandbox.*.js
- codesandbox-client/packages/app/www/js/sandbox-startup.*.js
- codesandbox-client/packages/app/www/js/vendors~sandbox.*.js
- codesandbox-client/packages/app/www/js/common-sandbox.*.js
It's specified in the Readme why this defaults to their servers: https://github.com/CompuIves/codesandbox-client/tree/master/packages/sandpack#why-is-the-bundler-hosted-externally-and-not-a-simple-import
Well, I wanted to still host it externally but without using codesandbox servers. But I'm not sure if the idea of sandpack is to always use codesandbox servers or if it's something that will change when it's released.
@CompuIves what do you think? should we host the bundler or keep using codesandbox servers?
Heya! We use CodeSandbox servers for one thing: the preparing of dependencies. You can host everything in the sandbox folder somewhere else and point the bundler to it and it will use that instead.
Note that the URL sandpack-blah.codesandbox.io actually proxies to unpkg.com.