dlmanning / gulp-sass

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

Importing files with "@use" breaks compilation #772

Closed nickbarrow closed 4 years ago

nickbarrow commented 4 years ago

I am attempting to switch all my @imports to @use, as per Sass's intentions to remove the @import rule.

For example, using

@use 'defaults/variables';
@use 'layout/theme';

in my main.scss compiles to:

@use 'defaults/variables';
@use 'layout/theme';

in my compiled css file, where I would expect it to compile down to my rules in theme.scss as it does with @import.

xzyfer commented 4 years ago

This is not currently supported with the node-sass engine. You can opt into the Dart sass engine to this feature. See the read me on how to do this.

vggarg96 commented 4 years ago

Hello I am having the similar issue although I am using @import "~@angular/material/theming"; I am getting following error when i run my gulp task Error: File to import not found or unreadable: ~@angular/material/theming.

I don't know why it is not working