2 ms·
This is really cool! Nice work. I wonder what it would take to get live-reloading into this without anything special added by the user. I think you'd be able
by steve_adams_86 4y ago
This is really cool! Nice work.
I wonder what it would take to get live-reloading into this without anything special added by the user.
I think you'd be able to add a JS snippet that listens for server pushes (you'd push when the file system changed, I guess), then reload using window.location? Not ideal though, you'd need to inject that into the page or do something weird like output everything in an iframe.
People love their live reloads though, and a lot of people who benefit from it aren't really sure how to implement it. It would be cool to have an opt-in, no-code solution.
- qbasic_forever 4y agoVite will add live reloading to HTML it serves: https://vitejs.dev/ https://vitejs.dev/ It even goes further with some supported frameworks and will do hot module replacement which is like live reloading but doesn't reload the full page and just injects the changed components (faster more instant updates). It'll live reload CSS, images, etc. too. If vite seems a little too complex browsersync will do nice life reloading for all HTML it serves too: https://browsersync.io/ https://browsersync.io/
- steve_adams_86 4y agoInteresting. I wonder how difficult it would be to bundle these features to work across devices like WorldWideWeb.app. If people were okay with a fairly opinionated workflow, you could offer some cool features. You’d run into the same issues as Create React App for more able users, but you might not encounter that as much with the type of people who would want this. Edit: also have to say I love vite. Such awesome work being done by those devs