Decouple HEEx from LiveView?

I agree that having phoenix_live_view as a necessary dependency in a Phoenix application is a pragmatic choice. I’ve had to worked with over-factored applications before in other languages and I agree it is laborious to coordinate changes across packages that can take the joy out of programming.

For my specific case, I want to use Heex without using Phoenix at all, which I should have mentioned in my reply. I have the beginnings of a single-script-file static site generator that I coded up today that uses heex for templating. Because phoenix_live_view also depends on phoenix, my “static site generator” ends up also bringing in Phoenix and its dependencies as well. :laughing:

iex(1)> Mix.install([:phoenix_live_view], force: true)
Resolving Hex dependencies...
Resolution completed in 0.332s
New:
  castore 1.0.1
  mime 2.0.3
  phoenix 1.7.2
  phoenix_html 3.3.1
  phoenix_live_view 0.18.18
  phoenix_pubsub 2.1.1
  phoenix_template 1.0.1
  plug 1.14.2
  plug_crypto 1.2.5
  telemetry 1.2.1
  websock 0.5.1
  websock_adapter 0.5.1

It would be nice if it is broken out one day, but also understand if it isn’t, or if it takes a while. Certainly won’t stop me from using it till then :smile: . It really is a great templating language.

3 Likes