dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.56k stars 381 forks source link

Why can't I use @use with this? #855

Open blaasvaer opened 2 years ago

blaasvaer commented 2 years ago

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

wkillerud commented 2 years ago

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'));
tonysamperi commented 1 year ago

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