gulp-sass
gulp-sass copied to clipboard
Why can't I use @use with this?
I've implemented this according to the docs ... but whenever I use @use
nothing works. but if I use the old @import
everything is fine.
Now, HOW do I make sure that I use the right (Dart Sass – which support @use
) version and NOT LibSass? I've installed Dart Sass globally npm i -g sass
, and also locally (otherwise it won't run). So, basically I'm confused ...
Can you post an example of what isn't working? A GitHub repository, CodeSandbox or something else?
gulp-sass
is just a thin wrapper around sass
, and I use @use
without problems myself. Most likely there's a problem with your setup, but you don't give much detail about it.
Now, HOW do I make sure that I use the right [...] version
In your project:
npm install sass gulp gulp-sass --save-dev
In your gulpfile:
const gulp = require('gulp');
const sass = require('gulp-sass')(require('sass'));
Same here, I had to manually wrap sass and it works like charm...
while passing the importers
when calling gulp-sass didn't work!