kirillplatonov / hotwire-livereload

Live reload gem for Hotwire Rails apps.
MIT License
483 stars 28 forks source link

ActionCable connection created by StimulusReflex breaks after TS/AC reload #33

Open w1t3k opened 1 year ago

w1t3k commented 1 year ago

Really enjoy working with Hotwire and your gem as it speeds up development. Unfortunately, I run into troubles when interacting with components using StimulusReflex. Seems that gem breaks the connection used by StimulusReflex when hot-reload happens via TurboStream or ActionCable. Enforcing a full-page reload is my temporary fix for it.

Steps to reproduce:

For now, I am resolving this with enforcing automatic full reload that library allows config.hotwire_livereload.force_reload_paths << [] but would be great if there would be a way to make it work the old way. Appreciate any suggestion, on how I could approach a described problem.