You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A standard way to implement cache busting is to use ManifestStaticFilesStorage. However, this breaks build steps when used in conjunction with django-sass-processor.
Say we have a local font file we want to reference in our sass file. If we hard-code the value, cache busting does not get applied since it's hard-coded. If we use the django-static python function (that we've configured in settings.py for django-sass-processor), cache busting does get added, but there's a problem build order:
If you run python manage.py compilescss before running python manage.py collectstatic, the sass compilation fails since no manifest file is found (generated by collectstatic).
If you run collectstatic first, then the compiled scss files are not moved to staticfiles.
If you run collectstatic before compilescss and then collectstatic again, the cache busting hash is added to django-static twice (once by compilescss and once by collectstatic).
The text was updated successfully, but these errors were encountered:
A standard way to implement cache busting is to use
ManifestStaticFilesStorage
. However, this breaks build steps when used in conjunction withdjango-sass-processor
.Here are some relevant links:
Context:
Say we have a local font file we want to reference in our sass file. If we hard-code the value, cache busting does not get applied since it's hard-coded. If we use the
django-static
python function (that we've configured insettings.py
fordjango-sass-processor
), cache busting does get added, but there's a problem build order:If you run
python manage.py compilescss
before runningpython manage.py collectstatic
, the sass compilation fails since no manifest file is found (generated bycollectstatic
).If you run
collectstatic
first, then the compiled scss files are not moved tostaticfiles
.If you run
collectstatic
beforecompilescss
and thencollectstatic
again, the cache busting hash is added todjango-static
twice (once bycompilescss
and once bycollectstatic
).The text was updated successfully, but these errors were encountered: