3π
β
It seems that heroku skipps the compiling scss files part, and pass directly to collecting statics so:
1st step was to disable collecting static files:
heroku config:set DISABLE_COLLECTSTATIC=1
2nd step is to run a post-compile process:
heroku run python manage.py compressscss
and then
heroku run python manage.py collectstatic --noinput
This can be run automatically by overriding the post-compile of python build pack shown here in this post Link to a how to create postcompile file
Where you create a file in bin/post_compile
in the root of the app with:
#!/usr/bin/env bash
cd "$1" || exit 1
python manage.py compilescss --traceback
python manage.py collectstatic --noinput --traceback
And push to Heroku to apply changes.
π€ketimaBU
Source:stackexchange.com