django-static-precompiler
django-static-precompiler copied to clipboard
Error thrown when using Dart Sass
I've noticed that whenever I try to compile scss files with django-static-precompiler using Dart Sass that a StaticCompliationError is thrown with no exception message thrown. It works fine with ruby-sass but ruby sass is deprecated. Is it possible that dart sass will ever be supported?
This is because (at minimum) dart-sass utilizes the -s flag for output style, whereas ruby-sass uses -t. It also doesn't support varying precision of calculations the same way ruby-sass does. You can subclass the SASS/SCSS compilers to adjust them and apply them in your settings.py file to use at the moment.
I believe the "no error" is because calling dart-sass with the wrong flags prints help to stdout, not stderr, which is captured here.
I noticed the same issue. You could uncomment line 74 in static_precompiler/compiler/scss.py and do not give settings (of course you do not get the correct functionality and this is a very nasty solution).
By the way, I am using dart-sass because ruby-sass is apperently end-of-life. Is there anyother compiler someone could recommend?
Any news on this? Is the Dart Sass planned to be supported?
You can use the libsass library instead, you can use pip to install it, much more easy to set up.
I'm closing this as a duplicate of #148 even though this is one was submitted earlier.