I am deploying a Phoenix application. This works well locally (localhot:4000), however on the production environment, the
app.css is appears to be missing:
I am deploying with
fly.io. This is the Github workflow that does the deploy:
The project can be seen here:
Before deploying I did run
mix assets.deploy, but this seems to be doing nothing.
I have also read this, but I don’t think I missed something:
Does anyone know if I am missing something?
Turns out, the
app.css was broken and as a consequence it was not being served to the clients. The reason for this what that VSCode was breaking my
app.css file by formatting it incorrectly, automatically, every time I saved.
I fixed my VSCode in this other topic:
I am using VSCode to do my Phoenix app, however, when modifying the app.css I realized the formatting was literally breaking my code. Specifically, “Format on Save”:
As you can see, hover:ring-gray becomes hover: ring-gray, which is invalid and breaks the file.
Other than disabling VSCode’s format on save, does someone know how else I can fix this?