Libsass seems to be one of the most popular compilers for SCSS and http://sass-lang.com/libsass lists a wide variety of libsass wrappers for many common programming languages. For a node-app, node-sass and the corresponding loaders for webpack or gulp seem to be the most obvious choice. Installing and using node-sass however requires both github access and a python 2.7 interpreter and for reasons I don't want to discuss here, I have neither in my production environment.
Sass, Webpack, PostCSS, Compass, and Animate. css are the most popular alternatives and competitors to node-sass.
LibSass is now deprecated—new projects should use Dart Sass instead.
Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.
While similar to the answer provided by @tsi, I would suggest your build occurs not on a dev machine, but rather a build box.
Some options include Gitlabs CI or Bitbucket pipelines
If you do run it on a dev machine, make sure to do it within Vagrant or Docker to create consistent artifacts.
To answer your second question, no, there doesn't seem to be an alternative
Unless your app must compile Sass on-the-fly, You should probably compile your styles on the dev machine and push static CSS to your production environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With