Move from node-sass to sass
There have been two implementations of Sass for a while now: node-sass
, a wrapper around the C++ libsass
, and dart-sass
, also available as a JavaScript library without dependencies as sass
. A few weeks ago, we ran into issues in the frontend CI with node:12-alpine
, because Alpine moved to Python 3.8. node-sass
has a dependency on an old version of node-gyp
that does not support Python 3 at all! We chose to just move to node:12
(see !628 (merged)) while we waited for this pull request that bumped the node-gyp
dependency.
But as always in the JavaScript ecosystem nothing is easy and there has been a plot twist: node-sass
is being deprecated. As they say in the lengthy issue description, the deprecation is very slow, but it's starting. They recommend to use dart-sass
or sass
instead.
Luckily for us, sass-loader
is fine with any Sass, so the switch should be nothing other than a npm uninstall -D node-sass; npm install -D sass
.