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

What are the options for dart sass or node sass?


Asked by Hallie Daniels on Dec 11, 2021 Dart Code style guide



Options for Dart Sass or Node Sass implementation. ℹ️ The indentedSyntax option has true value for the sass extension. ℹ️ Options such as data and file are unavailable and will be ignored.
And,
This option (abbreviated -s) controls the output style of the resulting CSS. Dart Sass supports two output styles: expanded (the default) writes each selector and declaration on its own line. compressed removes as many extra characters as possible, and writes the entire stylesheet on a single line.
Also Know, 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. First of all check your yarn.lock or package-lock.json to know if the version of the sass-loader that your react-scripts depends on is 7.2.0 or later.
Moreover,
The Dart Sass JavaScript API strives to be compatible with the existing node-sass API, so that it can be integrated into existing workflows with minimal changes. This post will show how to install the Dart Sass Javascript implementation with npm and use it via the supported JavaScript API and the command line.
Consequently,
The SASS team now recommends using Dart Sass in favor of LibSass for new development projects. This means that the sass npm package should be used instead of the node-sass npm package, which is built on top of LibSass, to compile sass with Node.js.