[HN Gopher] Codesandbox open sources their execution enviornment...
       ___________________________________________________________________
        
       Codesandbox open sources their execution enviornment: Sandpack
        
       Author : plondon514
       Score  : 63 points
       Date   : 2021-12-02 16:08 UTC (6 hours ago)
        
 (HTM) web link (codesandbox.io)
 (TXT) w3m dump (codesandbox.io)
        
       | chrisweekly wrote:
       | Mods: typo in title
        
         | plondon514 wrote:
         | I don't think I've ever spelled environment correctly!
        
           | nsonha wrote:
           | Until you did
        
       | [deleted]
        
       | syspec wrote:
       | 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 wrote:
         | Yep, it downloads and compiles dependencies on the client side.
         | However, it does this on a different domain for security
         | reasons.
        
           | TravisCooper wrote:
           | Is there an API to get the compiled and bundled sources into
           | one output/result?
        
             | CompuIves wrote:
             | Yes, 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 wrote:
           | So 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"
        
           | CompuIves wrote:
           | Also, while it uses the CodeSandbox bundler, you can self
           | host it so it's not dependent on our servers!
        
       | cphoover wrote:
       | I'd like to see storybook with support for this.
        
       | omneity wrote:
       | I was a very early adopter of Codesandbox and a patron back when
       | it was a tiny sideproject by Ives.
       | 
       | Years ago, very happy at the time, I wrote a lot of code using
       | Codesandbox, and expected it to remain private.
       | 
       | At some point seemingly, Codesandbox introduced plans (not just
       | patron support), made all my code public (for who knows how long)
       | and kept charging me until today! Quite the surprise, I expected
       | better from the team.
       | 
       | I know this post is technical, but I find it hard to separate the
       | technical merits of a company from their business practices.
        
         | CompuIves wrote:
         | First of all, super cool to hear that you've been such an early
         | adopter of CodeSandbox! Not many can say that.
         | 
         | The fact that we made your projects public and kept charging is
         | definitely a big mistake, and shouldn't have happened in the
         | first place. When you cancel a subscription, we should keep
         | your existing work private. Could you send me an email at
         | ives@codesandbox.io so we can fix it?
         | 
         | Apologies for the fact this happened to you, that's a severe
         | mistake and shouldn't have happened!
        
       | yuchi wrote:
       | Early adopter -- and even advocate since we extensively use for
       | our courses on web dev! -- fan of CodeSandbox.
       | 
       | Very happy to see the project big and stable enough to start open
       | sourcing core components of the product.
        
         | plondon514 wrote:
         | Hey yuchi! What are you working on irt courses on web dev? I'm
         | also working on something similar see https://codeamigo.dev.
         | Wonder if we could collaborate!
        
       ___________________________________________________________________
       (page generated 2021-12-02 23:02 UTC)