rollup / rollup-starter-app

Bare-bones example of how to create an application using Rollup
MIT License
424 stars 101 forks source link

Live reload #23

Open curran opened 3 years ago

curran commented 3 years ago

Currently one must refresh the browser manually on each build.

The builds are triggered automatically when source files change, so something that just watches bundle.js would be sufficient.

Might there be some low hanging fruit approach to enable live reload?

It appears serve does not do live reload, so we'd need to swap it out with something else. Perhaps something like live-server, which unfortunately seems a dead project (published 3 years ago).

Any ideas?

VincentVToscano commented 3 years ago

Hi @curran,

Hoping you're having a good day. I landed here by ways of a related issue on GH and was hoping that you might have gotten some more interest via another issue or source since you posted this on June 28? Have you had any interest elsewhere?

curran commented 3 years ago

I'm still interested in finding a suitable solution. I have not found one yet.

VincentVToscano commented 3 years ago

Thanks for your response. Hoping you find one as well.🤞Rollup is a great product and perhaps someone in the community will stumble upon this and offer up something that can accommodate this need. Best to you.

mugendi commented 9 months ago

Hey mates. I also love rollup a lot and love it tremendously. Had the same problem as all of you and I wrote a plugin rollup-plugin-reloadsite that leverages on the power of ReloadSite (another of my modules) to enable HMR on rollup.

Best part is you can watch multiple folders even those outside your src and dest directories, such as your server scripts.