by steve_adams_86 · 4y ago · 0 comments
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.
If vite seems a little too complex browsersync will do nice life reloading for all HTML it serves too: https://browsersync.io/
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