Open mfeckie opened 1 year ago
Is it that the browser doesn't reload, or that saving doesn't trigger a rebuild?
I ran into an issue where saving would trigger a rebuild, but the browser wouldn't refresh until I manually reloaded the page, even for CSS changes in template files. If that's the issue you're seeing, make sure that your root.html.heex
has a body
html tag in it. I had moved the body
tag to a different layout file, and that's when the browser refresh stopped working.
Based on this line it seems like the plug expects an HTML document with a body tag for it to work. @chrismccord is that true? Wonder if that's something that could be optionally configured?
Might be worth mentioning at least in the README, so noobs like me don't make that mistake 😂 Happy to open a PR if you think it's worth the effort!
it seems like the plug expects an HTML document with a body tag for it to work
Excellent find, @ellismarkf . Thank you -- saved me some serious debugging.
I will add a specific issue to warn on this, since this one is broader.
Version:
{:phoenix_live_reload, "~> 1.2", only: :dev}
I have components in this folder
lib/cockpit_web/components
with the following config for
live_reload
Saving files in the components folder, such as
lib/cockpit_web/components/common.ex
does not trigger a rebuildSaving files in the live folder does.
lib/cockpit_web/live/deployments_live.ex
I can't seem to figure out why this is the case and would love some insights into what I'm doing wrong