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
This issue was posted in django-compressor. I'm not sure which library would be best to provide this support.
The problem is that I can't use a variables.scss separate from other dependencies.
I've got around this by using a main.css and lots of @imports in there, which works just fine and is clean enough to me, but django-compressor doesn't notice when files other than main.scss are changed, requiring a server-restart for any scss that were @imported.
Webassets solved this by setting a SASS_AS_OUTPUT flag that concats files before processing them.
Do you think it's best solved in django-compressor or here?
The text was updated successfully, but these errors were encountered:
Hi @k-funk,
If I'm not mistaken, the only time django-compressor checks for changes to source files is when you have the precompiler listed in COMPRESS_CACHEABLE_PRECOMPILERS - and the docs tell you not to use this for SASS compilers, for exactly this reason.
The default behaviour without COMPRESS_CACHEABLE_PRECOMPILERS is to recompile everything on every request - which sounds inefficient, but I haven't found it to be a problem. (libsass is quite fast, and invoking it as a library rather than an external program helps to reduce overheads too.) In production, offline compression is the best way to go (although COMPRESS_CACHEABLE_PRECOMPILERS would probably work nicely there, as you won't be changing files between server restarts).
Either way, I think this is out of scope for django-libsass - django-libsass just follows django-compressor's precompiler API, and compiles whatever files django-compressor tells it to.
Thanks for the response. Didn't know that the default behavior is to recompile everything, which led me to discover that having COMPRESS_ENABLED = True was the reason that my application wasn't recompiling with each request.
This issue was posted in django-compressor. I'm not sure which library would be best to provide this support.
The problem is that I can't use a
variables.scss
separate from other dependencies.I've got around this by using a
main.css
and lots of@imports
in there, which works just fine and is clean enough to me, but django-compressor doesn't notice when files other thanmain.scss
are changed, requiring a server-restart for any scss that were@imported
.Webassets solved this by setting a
SASS_AS_OUTPUT
flag that concats files before processing them.Do you think it's best solved in django-compressor or here?
The text was updated successfully, but these errors were encountered: