Hey! We all know and love glitch, but what if we could have it offline? WebContainers would let us do that!
Think of WebContainers as your project, sandboxed inside your browser. It’s really cool tech and stuff that would let us do way more. Think access to more than one port for developing, offline code execution, and way more things to mess with!
StackBlitz is already powered by WebContainers, so it’s already stood the test of time. I’d love to see Glitch use the tech as well
This would probably need to be an optional feature, otherwise Glitch would no longer work for many use-cases.
I was thinking a switch. When you want to test locally you use WebContainers for absolute speed and privacy, and when you’re ready to go public you switch back to Glitch servers.
If you’re offline, WebContainers are the only option ofc
That’d mean that you couldn’t e.g. use native modules or non-nodejs things with webcontainers. Why not just run a Docker container in a web browser using v86 (for a VM) and qemu userspace emulation (so a 32-bit OS could run a x86_64 Docker container), then use that local Docker container?
Again, it’s a switch for a reason. Native modules would have a warning when WebContainers are on for clear reasons.
Would changes be synced to Glitch?
Of course. When you make a change online, Glitch recieves the new filesystem and updates it.
If you’re offline, it sends it on the next (online) page load.