deck-studio icon indicating copy to clipboard operation
deck-studio copied to clipboard

Stop using codesandbox servers

Open pomber opened this issue 7 years ago • 4 comments
trafficstars

The iframe is hitting codesandbox here. No idea how that works but we probably should self-host it.

pomber avatar Sep 22 '18 17:09 pomber

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

pomber avatar Sep 26 '18 17:09 pomber

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

SaraVieira avatar Sep 29 '18 22:09 SaraVieira

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?

pomber avatar Sep 30 '18 20:09 pomber

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.

CompuIves avatar Sep 30 '18 22:09 CompuIves