3 ms·
This looks really cool, I can't tell if it is a sandbox environment or not. Does it download the dependencies on the client side, and compile the JS on the cli
by syspec 5y ago
This looks really cool, I can't tell if it is a sandbox environment or not.
Does it download the dependencies on the client side, and compile the JS on the client side as well?
- CompuIves 5y agoYep, it downloads and compiles dependencies on the client side. However, it does this on a different domain for security reasons.
- CompuIves 5y agoAlso, while it uses the CodeSandbox bundler, you can self host it so it's not dependent on our servers!
- TravisCooper 5y agoIs there an API to get the compiled and bundled sources into one output/result?
- CompuIves 5y agoYes, after every compilation we send the full bundler state. This is saved on the context so you can use that to analyze the output. In one of the examples in the blog post we show the transpiled code for example. A hidden "feature" is that we automatically run tests defined (e.g. index.test.js) using jest, and dispatch the test results. So you can listen to that as well.
- syspec 5y agoSo by compiles it on the client side, you mean the JS is bundling the JS? If it is all happening in the users browser, what's do you mean when you say "it does this on a different domain"