Next.js Live: Code in the Browser with ESM, ServiceWorkers, Replicache, and WASM
nextjs.org
nextjs.org
https://blog.stackblitz.com/posts/introducing-webcontainers/
Is this using WebContainers? Or is it just very similar?
The HN discussion about StackBlitz focused on the problem that it would only work in Chrome… I assume that's true here as well? (Due to lack of the File System Access API?) https://news.ycombinator.com/item?id=27223012
No, it’s not using WebContainers. It’s a native ES module based Next.js dev server that works inside the browser.
Next.js Live seems very impressive, but this marketing line is scaring me off. It’s hard to imagine that running your app in webassembly within the browser has a measurable reduction in latency vs running on localhost. If anything, I would expect it to be slightly higher because of the overhead of interpreting/compiling wasm, and the slight performance hit of wasm vs native code.
However, there is a walkthrough of implementing the server side starting here:
https://doc.replicache.dev/guide/remote-database.
And you can find some samples here:
the same ideas have been ported to Vue and Svelte equivalents.
for comparison the netlify equivalents are:
- https://www.netlify.com/products/deploy-previews/
- https://docs.netlify.com/cli/get-started/#share-a-live-devel...
this replicache implementation seems more framework specific, but the live collab is just so much exciting to see!
We are excited to work with Vercel to add true collaborative text editing on top of Replicache soon.