Understand the difference between phoenix_live_reload and Phoenix.CodeReloader
mainIt is important to distinguish between these two tools:
- Phoenix.CodeReloader: Recompiles Elixir code in the
libdirectory. Changes to Elixir files are reloaded on the next request. - phoenix_live_reload: Injects JavaScript into your page to provide a WebSocket connection. It triggers browser reloads for templates, views, and JavaScript/CSS changes. If an Elixir file changes, it is recompiled and then the page is reloaded via the WebSocket. For assets like CSS/JS, it allows reloading without a full page refresh.