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

How to replace node sass with dart sass?


Asked by Zariah McDowell on Dec 11, 2021 Dart Code style guide



1. Replace node-sass with dart-sass 1. Uninstall node-sass 2. Install dart-sass 2. Update vue.config.js 3. Replace /deep/ with ::v-deep in component 4. Disable stylelint related rule If you use
In this manner,
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, Dart Sass's stand-alone command-line executable uses the blazing-fast Dart VM to compile your stylesheets. To install Dart Sass on the command line, check out the installation instructions . Once you've got it running, you can use it compile files:
In addition,
node-sass and Sass are both open source tools. It seems that Sass with 12K GitHub stars and 1.93K forks on GitHub has more adoption than node-sass with 6.49K GitHub stars and 949 GitHub forks. Advice on node-sass and Sass awesomebanana2018
Thereof,
Before v4.3.0, this project was built based on node-sass, but node-sass low-level dependencies libsass , resulting in many users installing Especially difficult for Windows users, it forces users to install python2 and Visual Studio in the windows environment to compile successfully.