LiveReload iFrame/code not injected into LiveView

I have added LiveView functionality to an existing project.

The views work and if I edit a template or controller view live-view-controller-module, the changes are detected, and non-live view browser windows get refreshed, but anything on a “live view url” doesn’t get the memo.

Looking at the source, I can see that the live_reload iframe isn’t being injected into any live_view pages.

Are they incompatible or did I miss a step when I “upgraded” my project? I had a look around endpoint.ex and config files but couldn’t see an obviously missing plug setup.

Edit: if I create a new project with --live, reloading works fine and the iframe is there, but diffing the config, endpoint, etc all seem to be the same (as much as they can be).

The issue was my root template was something like this:

html
  head
  @inner_content

and live.leex was

body
  @inner_content

where it must be

root:

html
  head
  body
    @inner_content

live:

@inner_content