Reputation: 170
I´m trying to transpile/compile the following example provided by [https://sass-lang.com/documentation/at-rules/use#load-paths]
// src/_corners.scss
$radius: 3px;
@mixin rounded {
border-radius: $radius;
}
// style.scss
@use "src/corners";
.button {
@include corners.rounded;
padding: 5px + corners.$radius;
}
this is the error that node-sass gives me:
{
"status": 1,
"file": "C:/Users/path/scss_mixins/style.scss",
"line": 4,
"column": 12,
"message": "Invalid CSS after \" @include corners\": expected \"}\", was \".rounded;\"",
"formatted": "Error: Invalid CSS after \" @include corners\": expected \"}\", was \".rounded;\"\n on line 4 of style.scss\n>> @include corners.rounded;\r\n -----------^\n"
}
this is my cli input:
npx node-sass -o ./dist style.scss
node, npm and node-sass are all up to dates versions.
Thanks for help in advance. :)
Upvotes: 6
Views: 1536
Reputation: 170
I have found out that node-sass based in libsass is currently not supporting the
@use "module";
feature.
I got it to work with dart´s sass for node.
Upvotes: 9