Separate "release" cycle for frontend assets in Phoenix project?

Hi there,

I have a phoenix project and I’m investigating whether it would be possible to separate my “frontend” release cycle from the backend one. The JS/CSS updates to this project are way more frequent than the Elixir updates, and doing a full Elixir release seems overkill, and especially because I want the VM to keep running while I’m doing the JS releases. (lots of long running processes etc)

Of course, using hot code upgrades this problem can be mitigated but that causes a whole class of other issues.

Doing a separate webpack build and serving the JS/CSS from another server is not that hard, but Phoenix does some digesting, with its hash/timestamped filenames; which is behaviour I’d like to keep (for forced cache invalidation). Ideally, I’d want my <%= static_path(@conn, "/js/app.js") %> constructs to keep working, so that this separation can be made optional (e.g. only on prod, not on dev).

Before I’m reinventing the wheel, is there anyone who already doing something like this, and if so, how?

What I’m looking into now is warming the Phoenix cache with my own checksummed files list, using Phoenix.Config.cache. That list would be generated by Webpack, because webpack generates checksummed files itself.