Digest / Release problem with Phoenix and Vue

Hello
I in my umbrella I have an app with Phoenix 1.4.3. The App is setup with webpack and VUE JS (placed under assets/src). Everything work so far, but if I pack everything to a release (using Distillery), it doesn’t work anymore. It seems that the whole VUE stuff will not load. Before I create the release, I run “mix phx.digest”, but It seems it doesn’t work properly. When I delete everything in “priv/static” and run then the Digest command, it only creates a cache_manifest.json file with content “{“digests”:{},“latest”:{},“version”:1}”
I’ve read the documentation here mix phx.digest — Phoenix v1.7.10, but it didn’t helped me.

Is there anything else I have to consider?

vue-phoenix-umbrella

1 Like

mix phx.digest doesn’t retrieve files from anywhere by default, but just act’s on what’s in priv/static/ already. Basically you’re in charge of getting the needed files into priv/static/, but the default assets pipeline generated by phoenix does include code to ensure the compiled js/css/images will be copied there. This makes it seem like phoenix is copying the files, while it’s actually just a certain webpack configuration doing that, while everything else assumes stuff is in priv/static/. Everything within priv/ should automatically be included in distillery releases.

Thank you LastKobrakai for your answer. This helped me a lot!

For the deployment I run npm run deploy in the assets folder. This runs webpack and copy the data into the priv folder. Then mix phx.digest and finally mix release