Using hologram to only transpile certain Elixir modules

I have this situation where I have 2 or 3 modules in my app containing particular logic that I had to replicate in JS. We keep the server-side Elixir as the source of truth but for the sake of convenience and smooth UX I had to replicate some of the validation logic.

So, my question is this: Is there a way or a plan to enable using Hologram from JS code so that it basically “only” transpiles certain Elixir modules the functions of which could then be invoked from the client side JS code?

This isn’t possible today, but you’re definitely not the first to ask about something similar! This feature request keeps coming back, and I’m starting to see it could be some way for gradual adoption.

I’ve been thinking about “Hologram Widgets” that you could inject into existing SPAs or LiveView apps, or use auto-transpiled code fragments like in your case. Your validation logic scenario is exactly what this would be great for.

No timeline yet, but it’s definitely on my radar.