Trying to use sass modules in create-react-app with the new @use syntax but receiving an error
The @use
rule is currently only supported by Dart Sass. You should use @import
instead.
You could switch to Dart Sass by taking advantage of package-aliasing
. I guess this will not work under yarn
.
First you remove the current node-sass
pkg, then run:
npm install node-sass@npm:sass
.
And you are fit to use the full features from sass
with some remarks though.
- Check the behavioral diffs here.
- The performance measurement indicates that
dart-sass
is slower thannode-sass
.
It's all up to you and this turns to be a valid option here, if you really want to use these features provided by Sass
.