Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Can you use dart sass instead of node sass?


Asked by Bo Buckley on Dec 11, 2021 Dart Code style guide



Is there any way to let the underlying CRA config know to use my installed dart-sass package instead of node-sass? There is this closed issue on CRA repository, so you probably can easily migrate from node-sass to Dart Sass just running a few commands.
In this manner,
For smaller or typical Sass projects, Dart-Sass (JS) is perfect, it’s easy to install without any external binding dependencies like node-sass. If your sass files take time to compile and if Node-Sass supports all the features you used, then go with Node-Sass!
Indeed, Dart Sass. Dart Sass is the primary implementation of Sass, which means it gets new features before any other implementation. It's fast, easy to install, and it compiles to pure JavaScript which makes it easy to integrate into modern web development workflows. Find out more or help out with its development on GitHub.
In respect to this,
Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. node-sass and Sass can be categorized as "CSS Pre-processors / Extensions" tools.
Consequently,
To begin, you'll need to install sass-loader: sass-loader requires you to install either Dart Sass or Node Sass on your own (more documentation can be found below). This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use. ℹ️ We highly recommend using Dart Sass.