I implemented this code some time ago to compile HEEx templates and give them to MJML (it’s mostly inspired by the live view renderer).
It works great, but recently, I enabled caller annotations in phoenix, and the @ symbol seems to cause some issues with MJML, and it fails to compile.
Is there a way to disable debug anotations just for this? The only place I found a reference to the debug annotations is in here, and it seems to only look at the application configuration.
In LiveView 1.2 (no release date yet), you’ll be able to do:
defmodule MyComponentModule do
use Phoenix.Component
@debug_heex_annotations false
@debug_attributes false
# any HEEx in here won't have debug annotations or data-phx-loc applied
end
Note that any component you call from a different module will still contain the annotations.