gulp-sass icon indicating copy to clipboard operation
gulp-sass copied to clipboard

Why can't I use @use with this?

Open blaasvaer opened this issue 2 years ago • 2 comments

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 ...

blaasvaer avatar Aug 23 '22 13:08 blaasvaer

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'));

wkillerud avatar Aug 23 '22 16:08 wkillerud

Same here, I had to manually wrap sass and it works like charm... while passing the importers when calling gulp-sass didn't work!

image

tonysamperi avatar Dec 17 '22 21:12 tonysamperi