3 ms·
What will be the changes in bundling? Will it just be a simple webpack plugin or will more discipline be required? Can this be run in any other back end other
by vijaybritto 6y ago
What will be the changes in bundling? Will it just be a simple webpack plugin or will more discipline be required?
Can this be run in any other back end other than Node since it only transmits a stream of serialized vdom?
- danabramov 6y ago>Will it just be a simple webpack plugin or will more discipline be required? Broadly speaking, it's a webpack plugin that finds all Client components and creates an id -> chunk URL map on the disk. And then the Node.js Loader that replaces imports to Client Components with access to to this map. You will be able to wire it up yourself, but there are other bits (like routing integration) so we're going to make it work in a framework like Next.js first. Then once there is a quality integration, you can copy how it's done in your custom setup. >Can this be run in any other back end other than Node since it only transmits a stream of serialized vdom? React components themselves are JS so we'd expect the backend to be in JS. (I mean, you could reimplement it in Rust or something, but then you can't easily move components to the Client and back.) There is no hard dependency on Node.js itself — as long as your JS environment has some sort of streams, we could make it work.